diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-02-23 22:17:11 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-02-23 22:17:11 +0000 |
commit | 9daeb61985f5befd6c0ad534cf51f392c8c07db6 (patch) | |
tree | 1491a281738def12394de8c32dfa660fc8899c1e /cpp/src | |
parent | more compat fixes (diff) | |
download | ice-9daeb61985f5befd6c0ad534cf51f392c8c07db6.tar.bz2 ice-9daeb61985f5befd6c0ad534cf51f392c8c07db6.tar.xz ice-9daeb61985f5befd6c0ad534cf51f392c8c07db6.zip |
removing operator[] from Freeze map due to MSVC problems
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Freeze/EvictorI.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/cpp/src/Freeze/EvictorI.cpp b/cpp/src/Freeze/EvictorI.cpp index 842a5e0930d..6df199fc543 100644 --- a/cpp/src/Freeze/EvictorI.cpp +++ b/cpp/src/Freeze/EvictorI.cpp @@ -129,7 +129,7 @@ Freeze::EvictorI::createObject(const Identity& ident, const ObjectPtr& servant) // // Save the new Ice Object to the database. // - _dict[ident] = servant; + _dict.insert(make_pair(ident, servant)); add(ident, servant); if(_trace >= 1) @@ -256,13 +256,9 @@ Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie) // Load the Ice Object from database and add a // Servant for it. // - ObjectPtr servant; - try
- { - servant = _dict[current.id]; - } - catch(const DBNotFoundException&) - { + IdentityObjectDict::iterator p = _dict.find(current.id); + if(p == _dict.end()) + { // // The Ice Object with the given identity does not exist, // client will get an ObjectNotExistException. @@ -273,6 +269,7 @@ Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie) // // Add the new Servant to the evictor queue. // + ObjectPtr servant = p->second; element = add(current.id, servant); // @@ -332,7 +329,7 @@ Freeze::EvictorI::finished(const Current& current, const ObjectPtr& servant, con { if(current.mode != Nonmutating && !element->destroyed) { - _dict[current.id] = servant; + _dict.insert(make_pair(current.id, servant)); } } @@ -407,7 +404,7 @@ Freeze::EvictorI::evict() // if(_persistenceMode == SaveUponEviction) { - _dict[ident] = element->servant; + _dict.insert(make_pair(ident, element->servant)); } // |