diff options
Diffstat (limited to 'cpp/src/IceGrid/Cache.h')
-rw-r--r-- | cpp/src/IceGrid/Cache.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/IceGrid/Cache.h b/cpp/src/IceGrid/Cache.h index 661242c5c54..27a4054f452 100644 --- a/cpp/src/IceGrid/Cache.h +++ b/cpp/src/IceGrid/Cache.h @@ -40,12 +40,12 @@ public: { } - virtual + virtual ~Cache() { } - bool + bool has(const Key& key) const { Lock sync(*this); @@ -59,9 +59,9 @@ public: removeImpl(key); } - void + void setTraceLevels(const TraceLevelsPtr& traceLevels) - { + { _traceLevels = traceLevels; } @@ -69,7 +69,7 @@ public: protected: - virtual ValuePtr + virtual ValuePtr getImpl(const Key& key) const { typename ValueMap::iterator p = const_cast<ValueMap&>(_entries).end(); @@ -80,12 +80,12 @@ protected: p = _entriesHint; } } - + if(p == const_cast<ValueMap&>(_entries).end()) { p = const_cast<ValueMap&>(_entries).find(key); } - + if(p != const_cast<ValueMap&>(_entries).end()) { const_cast<typename ValueMap::iterator&>(_entriesHint) = p; @@ -116,12 +116,12 @@ protected: p = _entriesHint; } } - + if(p == _entries.end()) { p = _entries.find(key); } - + assert(p != _entries.end()); if(p->second->canRemove()) { @@ -136,7 +136,7 @@ protected: TraceLevelsPtr _traceLevels; ValueMap _entries; - typename ValueMap::iterator _entriesHint; + typename ValueMap::iterator _entriesHint; }; template<typename T> |