summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/dispatcher/Client.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-07-22 17:09:25 -0400
committerBernard Normier <bernard@zeroc.com>2016-07-22 17:09:25 -0400
commit752e06b4eb63abb8a30bb958802eaedda72d3806 (patch)
tree7c2348544d202c310a55a62629abc4025daa03a5 /cpp/test/Ice/dispatcher/Client.cpp
parentDisable VS 2015 update 3 optimizer (diff)
downloadice-752e06b4eb63abb8a30bb958802eaedda72d3806.tar.bz2
ice-752e06b4eb63abb8a30bb958802eaedda72d3806.tar.xz
ice-752e06b4eb63abb8a30bb958802eaedda72d3806.zip
Added ICE_BUILDING_SRC to make builds
Ice::Dispatcher and Ice::LocalObject are now hidden with C++11 Reworked C++11 exception ice_clone, added ExceptionHelper + other C++ cleanups
Diffstat (limited to 'cpp/test/Ice/dispatcher/Client.cpp')
-rw-r--r--cpp/test/Ice/dispatcher/Client.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/cpp/test/Ice/dispatcher/Client.cpp b/cpp/test/Ice/dispatcher/Client.cpp
index b94e3199616..6440ce065f3 100644
--- a/cpp/test/Ice/dispatcher/Client.cpp
+++ b/cpp/test/Ice/dispatcher/Client.cpp
@@ -24,27 +24,6 @@ run(int, char**, const Ice::CommunicatorPtr& communicator)
return EXIT_SUCCESS;
}
-#ifdef ICE_CPP11_MAPPING
-class DispatcherCall : public Ice::DispatcherCall
-{
-public:
-
- DispatcherCall(function<void()> call) :
- _call(move(call))
- {
- }
-
- virtual void run()
- {
- _call();
- }
-
-private:
-
- function<void()> _call;
-};
-#endif
-
int
main(int argc, char* argv[])
{
@@ -64,10 +43,10 @@ main(int argc, char* argv[])
initData.properties->setProperty("Ice.TCP.SndSize", "50000");
#ifdef ICE_CPP11_MAPPING
- Ice::DispatcherPtr dispatcher = new Dispatcher();
+ IceUtil::Handle<Dispatcher> dispatcher = new Dispatcher;
initData.dispatcher = [=](function<void()> call, const shared_ptr<Ice::Connection>& conn)
{
- dispatcher->dispatch(new DispatcherCall(call), conn);
+ dispatcher->dispatch(make_shared<DispatcherCall>(call), conn);
};
#else
initData.dispatcher = new Dispatcher();