summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/single/Publisher.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/IceStorm/single/Publisher.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/IceStorm/single/Publisher.cpp')
-rw-r--r--cpp/test/IceStorm/single/Publisher.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/test/IceStorm/single/Publisher.cpp b/cpp/test/IceStorm/single/Publisher.cpp
index abe715961b2..9ff0d1c8b33 100644
--- a/cpp/test/IceStorm/single/Publisher.cpp
+++ b/cpp/test/IceStorm/single/Publisher.cpp
@@ -12,18 +12,18 @@ using namespace Ice;
using namespace IceStorm;
using namespace Test;
-class Publisher : public Test::TestHelper
+class Publisher final : public Test::TestHelper
{
public:
- void run(int, char**);
+ void run(int, char**) override;
};
void
Publisher::run(int argc, char** argv)
{
Ice::CommunicatorHolder communicator = initialize(argc, argv);
- PropertiesPtr properties = communicator->getProperties();
+ auto properties = communicator->getProperties();
string managerProxy = properties->getProperty("IceStormAdmin.TopicManager.Default");
if(managerProxy.empty())
{
@@ -32,7 +32,7 @@ Publisher::run(int argc, char** argv)
throw invalid_argument(os.str());
}
- IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(
+ auto manager = checkedCast<IceStorm::TopicManagerPrx>(
communicator->stringToProxy(managerProxy));
if(!manager)
{
@@ -41,14 +41,14 @@ Publisher::run(int argc, char** argv)
throw invalid_argument(os.str());
}
- TopicPrx topic = manager->retrieve("single");
+ auto topic = manager->retrieve("single");
assert(topic);
//
// Get a publisher object, create a twoway proxy and then cast to
// a Single object.
//
- SinglePrx single = SinglePrx::uncheckedCast(topic->getPublisher()->ice_twoway());
+ auto single = uncheckedCast<SinglePrx>(topic->getPublisher()->ice_twoway());
for(int i = 0; i < 1000; ++i)
{
single->event(i);