summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-09-12 05:56:24 +0000
committerMark Spruiell <mes@zeroc.com>2002-09-12 05:56:24 +0000
commit424fd1269fd9f1f8282d5747f87d9c429e5bd4e5 (patch)
tree049bce758bfe962bbcd4acb06297b4a189400bf5 /cpp/src
parentRe-enabled Slice tests. (diff)
downloadice-424fd1269fd9f1f8282d5747f87d9c429e5bd4e5.tar.bz2
ice-424fd1269fd9f1f8282d5747f87d9c429e5bd4e5.tar.xz
ice-424fd1269fd9f1f8282d5747f87d9c429e5bd4e5.zip
ice_removeFacet now returns ObjectPtr
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Object.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index a8c63305076..ac923c7485a 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -299,11 +299,13 @@ Ice::Object::ice_addFacet(const ObjectPtr& facet, const string& name)
_activeFacetMapHint = _activeFacetMap.insert(_activeFacetMapHint, make_pair(name, facet));
}
-void
+ObjectPtr
Ice::Object::ice_removeFacet(const string& name)
{
IceUtil::Mutex::Lock sync(_activeFacetMapMutex);
+ ObjectPtr result;
+
map<string, ObjectPtr>::iterator p = _activeFacetMap.end();
if(_activeFacetMapHint != _activeFacetMap.end())
@@ -321,6 +323,8 @@ Ice::Object::ice_removeFacet(const string& name)
if(p != _activeFacetMap.end())
{
+ result = p->second;
+
if(p == _activeFacetMapHint)
{
_activeFacetMap.erase(p++);
@@ -331,6 +335,8 @@ Ice::Object::ice_removeFacet(const string& name)
_activeFacetMap.erase(p);
}
}
+
+ return result;
}
void