diff options
author | Jose <jose@zeroc.com> | 2017-03-07 17:50:21 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-03-07 17:50:21 +0100 |
commit | 2fb47904cd901f762121b3780acd9bf2b393e19c (patch) | |
tree | 93064f56671805598a10501710519a1918f91a93 /cpp | |
parent | Bumped version to 3.7b0 (diff) | |
download | ice-2fb47904cd901f762121b3780acd9bf2b393e19c.tar.bz2 ice-2fb47904cd901f762121b3780acd9bf2b393e19c.tar.xz ice-2fb47904cd901f762121b3780acd9bf2b393e19c.zip |
Fix C++11 build failure
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Glacier2/application/Client.cpp | 22 | ||||
-rw-r--r-- | cpp/test/Glacier2/application/Server.cpp | 4 |
2 files changed, 10 insertions, 16 deletions
diff --git a/cpp/test/Glacier2/application/Client.cpp b/cpp/test/Glacier2/application/Client.cpp index 0bd19f618bb..cc1ebaa0098 100644 --- a/cpp/test/Glacier2/application/Client.cpp +++ b/cpp/test/Glacier2/application/Client.cpp @@ -127,21 +127,15 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.Default.Router", ""); Ice::CommunicatorPtr communicator = Ice::initialize(initData); - Ice::ObjectPrx processBase; - { - cout << "testing stringToProxy for process object... " << flush; - processBase = communicator->stringToProxy("Glacier2/admin -f Process:" + - getTestEndpoint(communicator, 11)); - cout << "ok" << endl; - } - Ice::ProcessPrx process; - { - cout << "testing checked cast for admin object... " << flush; - process = Ice::ProcessPrx::checkedCast(processBase); - test(process != 0); - cout << "ok" << endl; - } + cout << "testing stringToProxy for process object... " << flush; + Ice::ObjectPrxPtr processBase = communicator->stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(communicator, 11)); + cout << "ok" << endl; + + cout << "testing checked cast for admin object... " << flush; + Ice::ProcessPrxPtr process = ICE_CHECKED_CAST(Ice::ProcessPrx, processBase); + test(process != 0); + cout << "ok" << endl; cout << "testing Glacier2 shutdown... " << flush; process->shutdown(); diff --git a/cpp/test/Glacier2/application/Server.cpp b/cpp/test/Glacier2/application/Server.cpp index 6cb3b3aaf06..514a49e7f9e 100644 --- a/cpp/test/Glacier2/application/Server.cpp +++ b/cpp/test/Glacier2/application/Server.cpp @@ -31,7 +31,7 @@ class CallbackI : public Callback public: virtual void - initiateCallback(const CallbackReceiverPrx& proxy, const Ice::Current& current) + initiateCallback(ICE_IN(CallbackReceiverPrxPtr) proxy, const Ice::Current& current) { proxy->callback(current.ctx); } @@ -53,7 +53,7 @@ Server::run(int, char**) communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", getTestEndpoint(communicator(), 0)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter"); - adapter->add(new CallbackI(), Ice::stringToIdentity("callback")); + adapter->add(ICE_MAKE_SHARED(CallbackI), Ice::stringToIdentity("callback")); adapter->activate(); communicator()->waitForShutdown(); |