diff options
| author | Casey Rodarmor <[email protected]> | 2015-08-17 12:05:47 -0400 |
|---|---|---|
| committer | Casey Rodarmor <[email protected]> | 2015-08-17 12:15:32 -0400 |
| commit | fd2d862fbc4d13129bfa3702a9241d9ea46ddae5 (patch) | |
| tree | 000b8543ca8b5a0bf669b11846c62e8c41058b94 /src | |
| parent | Merge pull request #6553 (diff) | |
| download | discoin-fd2d862fbc4d13129bfa3702a9241d9ea46ddae5.tar.xz discoin-fd2d862fbc4d13129bfa3702a9241d9ea46ddae5.zip | |
Make limited map actually respect max size
Diffstat (limited to 'src')
| -rw-r--r-- | src/limitedmap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/limitedmap.h b/src/limitedmap.h index e8ea54965..b990eab3e 100644 --- a/src/limitedmap.h +++ b/src/limitedmap.h @@ -38,7 +38,7 @@ public: { std::pair<iterator, bool> ret = map.insert(x); if (ret.second) { - if (nMaxSize && map.size() == nMaxSize) { + if (nMaxSize && map.size() > nMaxSize) { map.erase(rmap.begin()->second); rmap.erase(rmap.begin()); } |