diff options
author | Casey Rodarmor <casey@rodarmor.com> | 2015-08-17 12:05:47 -0400 |
---|---|---|
committer | Casey Rodarmor <casey@rodarmor.com> | 2015-08-17 12:15:32 -0400 |
commit | fd2d862fbc4d13129bfa3702a9241d9ea46ddae5 (patch) | |
tree | 000b8543ca8b5a0bf669b11846c62e8c41058b94 /src/limitedmap.h | |
parent | 1e92b275406e3fbc7ab59d2ada1c882ca15fb36f (diff) |
Make limited map actually respect max size
Diffstat (limited to 'src/limitedmap.h')
-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 e8ea549653..b990eab3ee 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()); } |