summaryrefslogtreecommitdiff
path: root/cpp/test/IceGrid/update/Server.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2021-02-03 11:16:06 -0500
committerJoe George <joe@zeroc.com>2021-02-03 11:42:30 -0500
commit48f9b28634908c43a23c30e219a9abfb038c1539 (patch)
tree81420c7142bb57902ad96de1d057b5259c29a287 /cpp/test/IceGrid/update/Server.cpp
parentIceGrid and IceStorm fixes (diff)
downloadice-48f9b28634908c43a23c30e219a9abfb038c1539.tar.bz2
ice-48f9b28634908c43a23c30e219a9abfb038c1539.tar.xz
ice-48f9b28634908c43a23c30e219a9abfb038c1539.zip
Additional C++11 fixes
Diffstat (limited to 'cpp/test/IceGrid/update/Server.cpp')
-rw-r--r--cpp/test/IceGrid/update/Server.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/cpp/test/IceGrid/update/Server.cpp b/cpp/test/IceGrid/update/Server.cpp
index 6cb98a3566b..c1a5e03658d 100644
--- a/cpp/test/IceGrid/update/Server.cpp
+++ b/cpp/test/IceGrid/update/Server.cpp
@@ -8,23 +8,22 @@
using namespace std;
-class Server : public Test::TestHelper
+class Server final : public Test::TestHelper
{
public:
- void run(int, char**);
+ void run(int, char**) override;
};
void
Server::run(int argc, char** argv)
{
- Ice::CommunicatorHolder communicator = initialize(argc, argv);
- Ice::PropertiesPtr properties = communicator->getProperties();
- string name = properties->getProperty("Ice.ProgramName");
+ Ice::CommunicatorHolder communicatorHolder = initialize(argc, argv);
+ auto properties = communicatorHolder->getProperties();
+ auto name = properties->getProperty("Ice.ProgramName");
- Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Server");
- Ice::ObjectPtr object = new TestI(properties);
- adapter->add(object, Ice::stringToIdentity(name));
+ auto adapter = communicatorHolder->createObjectAdapter("Server");
+ adapter->add(make_shared<TestI>(move(properties)), Ice::stringToIdentity(name));
try
{
@@ -33,7 +32,7 @@ Server::run(int argc, char** argv)
catch(const Ice::ObjectAdapterDeactivatedException&)
{
}
- communicator->waitForShutdown();
+ communicatorHolder->waitForShutdown();
}
DEFINE_TEST(Server)