Updated the master's decline handler to take an rvalue reference. The master's handlers should all take rvalue references for consistency.
Review: https://reviews.apache.org/r/65968 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9b271268 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9b271268 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9b271268 Branch: refs/heads/master Commit: 9b2712681e430f5bdf549f234a08453f0fd963bf Parents: 8de98cf Author: Benjamin Mahler <[email protected]> Authored: Wed Mar 7 19:45:14 2018 -0800 Committer: Benjamin Mahler <[email protected]> Committed: Fri Mar 9 12:36:13 2018 -0800 ---------------------------------------------------------------------- src/master/http.cpp | 2 +- src/master/master.cpp | 6 +++--- src/master/master.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/9b271268/src/master/http.cpp ---------------------------------------------------------------------- diff --git a/src/master/http.cpp b/src/master/http.cpp index a38866d..0f05e92 100644 --- a/src/master/http.cpp +++ b/src/master/http.cpp @@ -1100,7 +1100,7 @@ Future<Response> Master::Http::scheduler( return Accepted(); case scheduler::Call::DECLINE: - master->decline(framework, call.decline()); + master->decline(framework, std::move(*call.mutable_decline())); return Accepted(); case scheduler::Call::ACCEPT_INVERSE_OFFERS: http://git-wip-us.apache.org/repos/asf/mesos/blob/9b271268/src/master/master.cpp ---------------------------------------------------------------------- diff --git a/src/master/master.cpp b/src/master/master.cpp index b368598..644466e 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -2384,7 +2384,7 @@ void Master::receive( break; case scheduler::Call::DECLINE: - decline(framework, call.decline()); + decline(framework, std::move(*call.mutable_decline())); break; case scheduler::Call::ACCEPT_INVERSE_OFFERS: @@ -3467,7 +3467,7 @@ void Master::launchTasks( *message.mutable_offer_ids() = std::move(*launchTasksMessage.mutable_offer_ids()); - decline(framework, message); + decline(framework, std::move(message)); } } @@ -5444,7 +5444,7 @@ void Master::acceptInverseOffers( void Master::decline( Framework* framework, - const scheduler::Call::Decline& decline) + scheduler::Call::Decline&& decline) { CHECK_NOTNULL(framework); http://git-wip-us.apache.org/repos/asf/mesos/blob/9b271268/src/master/master.hpp ---------------------------------------------------------------------- diff --git a/src/master/master.hpp b/src/master/master.hpp index f85b232..115a3b4 100644 --- a/src/master/master.hpp +++ b/src/master/master.hpp @@ -1028,7 +1028,7 @@ private: void decline( Framework* framework, - const scheduler::Call::Decline& decline); + scheduler::Call::Decline&& decline); void declineInverseOffers( Framework* framework,
