aboutsummaryrefslogtreecommitdiff
path: root/src/zmq/zmqnotificationinterface.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-11-29 18:43:29 -0800
committerMatt Corallo <git@bluematt.me>2016-12-24 11:10:39 -0500
commit71fde5563b5d05a63e3ad08a3c32a9e5ffb952f7 (patch)
tree2692245d7c49deb7196763b88b138320b23fe417 /src/zmq/zmqnotificationinterface.cpp
parent0cf86a6678413aa03e765a7133f048df4001ff4c (diff)
Get rid of mapArgs direct access in ZMQ construction
Diffstat (limited to 'src/zmq/zmqnotificationinterface.cpp')
-rw-r--r--src/zmq/zmqnotificationinterface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp
index a7e20a8356..2f5efcb4db 100644
--- a/src/zmq/zmqnotificationinterface.cpp
+++ b/src/zmq/zmqnotificationinterface.cpp
@@ -29,7 +29,7 @@ CZMQNotificationInterface::~CZMQNotificationInterface()
}
}
-CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const std::map<std::string, std::string> &args)
+CZMQNotificationInterface* CZMQNotificationInterface::Create()
{
CZMQNotificationInterface* notificationInterface = NULL;
std::map<std::string, CZMQNotifierFactory> factories;
@@ -42,11 +42,11 @@ CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const
for (std::map<std::string, CZMQNotifierFactory>::const_iterator i=factories.begin(); i!=factories.end(); ++i)
{
- std::map<std::string, std::string>::const_iterator j = args.find("-zmq" + i->first);
- if (j!=args.end())
+ std::string arg("-zmq" + i->first);
+ if (IsArgSet(arg))
{
CZMQNotifierFactory factory = i->second;
- std::string address = j->second;
+ std::string address = GetArg(arg, "");
CZMQAbstractNotifier *notifier = factory();
notifier->SetType(i->first);
notifier->SetAddress(address);