diff options
Diffstat (limited to 'cpp/src/IceGrid/Cache.h')
-rw-r--r-- | cpp/src/IceGrid/Cache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/Cache.h b/cpp/src/IceGrid/Cache.h index 2480f4b1807..51d7e9dcc57 100644 --- a/cpp/src/IceGrid/Cache.h +++ b/cpp/src/IceGrid/Cache.h @@ -63,7 +63,7 @@ protected: getImpl(const Key& key) const { typename ValueMap::iterator p = const_cast<ValueMap&>(_entries).end(); - if(_entriesHint != _entries.end()) + if(_entriesHint != p) { if(_entriesHint->first == key) { @@ -71,12 +71,12 @@ protected: } } - if(p == _entries.end()) + if(p == const_cast<ValueMap&>(_entries).end()) { p = const_cast<ValueMap&>(_entries).find(key); } - if(p != _entries.end()) + if(p != const_cast<ValueMap&>(_entries).end()) { const_cast<typename ValueMap::iterator&>(_entriesHint) = p; return p->second; |