Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Cache/LeastRecentlyUsedIndex.h @ 4199:fbc49a65340a
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Sep 2020 20:28:20 +0200 |
parents | bf7b9edf6b81 |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4198:c671331ea1ef | 4199:fbc49a65340a |
---|---|
144 | 144 |
145 void GetAllKeys(std::vector<T>& keys) const | 145 void GetAllKeys(std::vector<T>& keys) const |
146 { | 146 { |
147 keys.clear(); | 147 keys.clear(); |
148 keys.reserve(GetSize()); | 148 keys.reserve(GetSize()); |
149 for (typename Index::const_iterator it = index_.begin(); it != index_.end(); it++) | 149 for (typename Index::const_iterator it = index_.begin(); it != index_.end(); ++it) |
150 { | 150 { |
151 keys.push_back(it->first); | 151 keys.push_back(it->first); |
152 } | 152 } |
153 } | 153 } |
154 | |
155 }; | 154 }; |
156 | 155 |
157 | 156 |
158 | 157 |
159 | 158 |
166 { | 165 { |
167 #ifndef NDEBUG | 166 #ifndef NDEBUG |
168 assert(index_.size() == queue_.size()); | 167 assert(index_.size() == queue_.size()); |
169 | 168 |
170 for (typename Index::const_iterator | 169 for (typename Index::const_iterator |
171 it = index_.begin(); it != index_.end(); it++) | 170 it = index_.begin(); it != index_.end(); ++it) |
172 { | 171 { |
173 assert(it->second != queue_.end()); | 172 assert(it->second != queue_.end()); |
174 assert(it->second->first == it->first); | 173 assert(it->second->first == it->first); |
175 } | 174 } |
176 #endif | 175 #endif |