summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r--cpp/src/Ice/Proxy.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 7b7a4095ad9..27dd8f09f32 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -75,6 +75,39 @@ IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string&
return 0;
}
+::Ice::ObjectPrx
+IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string& typeId, const Context& ctx)
+{
+//
+// Without this work-around, release VC7.0 build crash when FacetNotExistException
+// is raised
+//
+#if defined(_MSC_VER) && (_MSC_VER == 1300)
+ ObjectPrx fooBar;
+#endif
+
+ if(b)
+ {
+ ObjectPrx bb = b->ice_newFacet(f);
+ try
+ {
+ if(bb->ice_isA(typeId, ctx))
+ {
+ return bb;
+ }
+#ifndef NDEBUG
+ else
+ {
+ assert(typeId != "::Ice::Object");
+ }
+#endif
+ }
+ catch(const FacetNotExistException&)
+ {
+ }
+ }
+ return 0;
+}
bool
IceProxy::Ice::Object::operator==(const Object& r) const