diff options
author | Joe George <joe@zeroc.com> | 2021-02-03 11:16:06 -0500 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2021-02-03 11:42:30 -0500 |
commit | 48f9b28634908c43a23c30e219a9abfb038c1539 (patch) | |
tree | 81420c7142bb57902ad96de1d057b5259c29a287 /cpp/test/IceGrid/deployer/Server.cpp | |
parent | IceGrid and IceStorm fixes (diff) | |
download | ice-48f9b28634908c43a23c30e219a9abfb038c1539.tar.bz2 ice-48f9b28634908c43a23c30e219a9abfb038c1539.tar.xz ice-48f9b28634908c43a23c30e219a9abfb038c1539.zip |
Additional C++11 fixes
Diffstat (limited to 'cpp/test/IceGrid/deployer/Server.cpp')
-rw-r--r-- | cpp/test/IceGrid/deployer/Server.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp index f3e3fd320de..77c48d822b5 100644 --- a/cpp/test/IceGrid/deployer/Server.cpp +++ b/cpp/test/IceGrid/deployer/Server.cpp @@ -2,7 +2,11 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -#include <IceUtil/DisableWarnings.h> +#ifdef _MSC_VER +// For getenv +# define _CRT_SECURE_NO_WARNINGS +#endif + #include <Ice/Ice.h> #include <TestI.h> #include <TestHelper.h> @@ -14,7 +18,7 @@ class Server : public Test::TestHelper { public: - void run(int, char**); + void run(int, char**) override; }; void @@ -69,9 +73,9 @@ Server::run(int argc, char** argv) Ice::CommunicatorHolder communicator = initialize(argc, argv); - Ice::PropertiesPtr properties = communicator->getProperties(); + auto properties = communicator->getProperties(); string name = properties->getProperty("Ice.ProgramName"); - Ice::ObjectAdapterPtr adapter; + shared_ptr<Ice::ObjectAdapter> adapter; if(!properties->getProperty("ReplicatedAdapter").empty()) { @@ -80,8 +84,7 @@ Server::run(int argc, char** argv) } adapter = communicator->createObjectAdapter("Server"); - Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, Ice::stringToIdentity(name)); + adapter->add(make_shared<TestI>(properties), Ice::stringToIdentity(name)); try { adapter->activate(); |