diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-14 20:55:50 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-14 20:55:50 +0000 |
commit | e3a1b7a03afe45131e5429c7ea3f60b7abf2e5aa (patch) | |
tree | db04bf15fcb33e8a6ce2bc2ad7cd642d24de0ab5 /filedistribution | |
parent | 4cd6b80379fbc47fa734a3a5ed0302c409868970 (diff) |
Avoid static cast
Diffstat (limited to 'filedistribution')
-rw-r--r-- | filedistribution/src/tests/rpc/testfileprovider.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filedistribution/src/tests/rpc/testfileprovider.cpp b/filedistribution/src/tests/rpc/testfileprovider.cpp index 5c1dd0451ab..6be172d0afd 100644 --- a/filedistribution/src/tests/rpc/testfileprovider.cpp +++ b/filedistribution/src/tests/rpc/testfileprovider.cpp @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(fileDistributionRPCTest) { //must be run through valgrind BOOST_AUTO_TEST_CASE(require_that_queued_requests_does_not_leak_memory) { const std::string spec("tcp/localhost:9111"); - fd::FileProvider::SP provider(new fd::MockFileProvider()); + std::shared_ptr<MockFileProvider> provider(new MockFileProvider()); fd::FileDistributorRPC::SP fileDistributorRPC(new fd::FileDistributorRPC(spec, provider)); fileDistributorRPC->start(); @@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(require_that_queued_requests_does_not_leak_memory) { request->GetParams()->AddString(MockFileProvider::_queueForeverFileReference.c_str()); target->InvokeVoid(request); - static_cast<fd::MockFileProvider &>(*provider)._queueForeverBarrier.wait(); //the request has been enqueued. + provider->_queueForeverBarrier.wait(); //the request has been enqueued. fileDistributorRPC.reset(); target->SubRef(); |