aboutsummaryrefslogtreecommitdiff
path: root/src/limitedmap.h
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2015-08-17 12:05:47 -0400
committerCasey Rodarmor <casey@rodarmor.com>2015-08-17 12:15:32 -0400
commitfd2d862fbc4d13129bfa3702a9241d9ea46ddae5 (patch)
tree000b8543ca8b5a0bf669b11846c62e8c41058b94 /src/limitedmap.h
parent1e92b275406e3fbc7ab59d2ada1c882ca15fb36f (diff)
Make limited map actually respect max size
Diffstat (limited to 'src/limitedmap.h')
-rw-r--r--src/limitedmap.h2
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());
}