diff options
author | Henning Baldersheim <balder@oath.com> | 2018-10-04 22:05:19 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-10-04 22:05:19 +0200 |
commit | 0bdd3c5fa4326ed4106b9aee0585d57c7193bd97 (patch) | |
tree | 2b519cf259eb30ab28d85fc560a589457f54ed17 /documentapi/src/tests/routablefactory | |
parent | 3f2b1a9230fbab12f2e8b5afcf1e0ad72f3d872a (diff) |
Remove the costly and unnecessary setSlobrokId interface.
Diffstat (limited to 'documentapi/src/tests/routablefactory')
-rw-r--r-- | documentapi/src/tests/routablefactory/routablefactory.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/documentapi/src/tests/routablefactory/routablefactory.cpp b/documentapi/src/tests/routablefactory/routablefactory.cpp index 63d37de8c65..13ebd45fdc6 100644 --- a/documentapi/src/tests/routablefactory/routablefactory.cpp +++ b/documentapi/src/tests/routablefactory/routablefactory.cpp @@ -114,32 +114,32 @@ public: TEST_APPHOOK(Test); TestData::TestData() : - _repo(new DocumentTypeRepo), + _repo(std::make_shared<DocumentTypeRepo>()), _slobrok(), _loadTypes(), - _srcProtocol(new DocumentProtocol(_loadTypes, _repo)), + _srcProtocol(std::make_shared<DocumentProtocol>(_loadTypes, _repo)), _srcServer(mbus::MessageBusParams().addProtocol(_srcProtocol), - mbus::RPCNetworkParams().setSlobrokConfig(_slobrok.config())), + mbus::RPCNetworkParams(_slobrok.config())), _srcSession(), _srcHandler(), - _dstProtocol(new DocumentProtocol(_loadTypes, _repo)), + _dstProtocol(std::make_shared<DocumentProtocol>(_loadTypes, _repo)), _dstServer(mbus::MessageBusParams().addProtocol(_dstProtocol), - mbus::RPCNetworkParams().setIdentity(mbus::Identity("dst")).setSlobrokConfig(_slobrok.config())), + mbus::RPCNetworkParams(_slobrok.config()).setIdentity(mbus::Identity("dst"))), _dstSession(), _dstHandler() { } -TestData::~TestData() {} +TestData::~TestData() = default; bool TestData::start() { _srcSession = _srcServer.mb.createSourceSession(mbus::SourceSessionParams().setReplyHandler(_srcHandler)); - if (_srcSession.get() == NULL) { + if ( ! _srcSession) { return false; } _dstSession = _dstServer.mb.createDestinationSession(mbus::DestinationSessionParams().setName("session").setMessageHandler(_dstHandler)); - if (_dstSession.get() == NULL) { + if ( ! _dstSession) { return false; } if (!_srcServer.waitSlobrok("dst/session", 1u)) { |