From b9ce1ca3cef533d91fc4243dff26528d74d66baa Mon Sep 17 00:00:00 2001 From: sangelovic Date: Mon, 18 Mar 2019 21:28:17 +0100 Subject: [PATCH] Remove unnecessary copy-construction when making SdBus --- src/Connection.cpp | 6 +++--- test/integrationtests/AdaptorAndProxy_test.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Connection.cpp b/src/Connection.cpp index cc9c3c4..7386b83 100755 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -188,7 +188,7 @@ void Connection::sendReplyAsynchronously(const sdbus::MethodReply& reply) std::unique_ptr Connection::clone() const { - auto interface = std::make_unique(SdBus()); + auto interface = std::make_unique(); assert(interface != nullptr); return std::make_unique(busType_, std::move(interface)); } @@ -359,7 +359,7 @@ std::unique_ptr createConnection(const std::string& name) std::unique_ptr createSystemBusConnection() { - auto interface = std::make_unique(SdBus()); + auto interface = std::make_unique(); assert(interface != nullptr); return std::make_unique(sdbus::internal::Connection::BusType::eSystem, std::move(interface)); @@ -374,7 +374,7 @@ std::unique_ptr createSystemBusConnection(const std::string& std::unique_ptr createSessionBusConnection() { - auto interface = std::make_unique(SdBus()); + auto interface = std::make_unique(); assert(interface != nullptr); return std::make_unique(sdbus::internal::Connection::BusType::eSession, std::move(interface)); diff --git a/test/integrationtests/AdaptorAndProxy_test.cpp b/test/integrationtests/AdaptorAndProxy_test.cpp index 56b0682..5a91682 100644 --- a/test/integrationtests/AdaptorAndProxy_test.cpp +++ b/test/integrationtests/AdaptorAndProxy_test.cpp @@ -89,7 +89,7 @@ public: }; sdbus::internal::Connection AdaptorAndProxyFixture::m_connection{sdbus::internal::Connection::BusType::eSystem, - std::make_unique(SdBus())}; + std::make_unique()}; }