summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Proxy.cpp6
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp6
-rw-r--r--cpp/src/slice2cpp/Gen.cpp7
3 files changed, 14 insertions, 5 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index ec185e9d7de..b89c95634ae 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -715,7 +715,7 @@ Ice::ObjectPrx::ice_invoke_async(const string& operation,
shared_ptr<ObjectPrx>
Ice::ObjectPrx::__newInstance() const
{
- return make_shared<ObjectPrx>();
+ return createProxy<ObjectPrx>();
}
ostream&
@@ -1349,7 +1349,7 @@ ICE_OBJECT_PRX::ice_identity(const Identity& newIdentity) const
else
{
#ifdef ICE_CPP11_MAPPING
- auto proxy = make_shared<ObjectPrx>();
+ auto proxy = createProxy<ObjectPrx>();
#else
ObjectPrxPtr proxy = new IceProxy::Ice::Object;
#endif
@@ -1388,7 +1388,7 @@ ICE_OBJECT_PRX::ice_facet(const string& newFacet) const
else
{
#ifdef ICE_CPP11_MAPPING
- auto proxy = make_shared<ObjectPrx>();
+ auto proxy = createProxy<ObjectPrx>();
#else
ObjectPrx proxy = new IceProxy::Ice::Object;
#endif
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index 018cac70602..0b69caf3d82 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -99,7 +99,11 @@ IceInternal::ProxyFactory::referenceToProxy(const ReferencePtr& ref) const
{
if(ref)
{
- ObjectPrxPtr proxy = ICE_MAKE_SHARED(::IceProxy::Ice::Object);
+#ifdef ICE_CPP11_MAPPING
+ auto proxy = createProxy<ObjectPrx>();
+#else
+ ObjectPrx proxy = new ::IceProxy::Ice::Object();
+#endif
proxy->setup(ref);
return proxy;
}
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index b221d85c567..2a0bef6063c 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -6210,6 +6210,11 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl << "static const ::std::string& ice_staticId();";
H.dec();
+ H << sp << nl << "protected: ";
+ H.inc();
+ H << nl << prx << "() = default;";
+ H << nl << "friend ::std::shared_ptr<" << prx << "> IceInternal::createProxy<" << prx << ">();";
+ H.dec();
H << sp << nl << "private: ";
H.inc();
H << nl << "virtual ::std::shared_ptr<::Ice::ObjectPrx> __newInstance() const;";
@@ -6230,7 +6235,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << sp << nl << "::std::shared_ptr<::Ice::ObjectPrx>";
C << nl << scoped.substr(2) << "::__newInstance() const";
C << sb;
- C << nl << "return ::std::make_shared<" << prx << ">();";
+ C << nl << "return ::IceInternal::createProxy<" << prx << ">();";
C << eb;
_useWstring = resetUseWstring(_useWstringHist);