Updated the master's receive handler to take an rvalue reference.

This allows us to perform copy elimination in subsequent patches.

Review: https://reviews.apache.org/r/65966


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2e716fa8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2e716fa8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2e716fa8

Branch: refs/heads/master
Commit: 2e716fa8471bd1c391e21ab9bd34645766aff1dc
Parents: b281f56
Author: Benjamin Mahler <[email protected]>
Authored: Wed Mar 7 19:39:53 2018 -0800
Committer: Benjamin Mahler <[email protected]>
Committed: Fri Mar 9 12:36:13 2018 -0800

----------------------------------------------------------------------
 src/master/master.cpp | 2 +-
 src/master/master.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2e716fa8/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 12e314e..b031c19 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -2322,7 +2322,7 @@ void Master::drop(
 
 void Master::receive(
     const UPID& from,
-    const scheduler::Call& call)
+    scheduler::Call&& call)
 {
   // TODO(vinod): Add metrics for calls.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/2e716fa8/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index 0667daf..74cd0e4 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -980,7 +980,7 @@ private:
   // Call handlers.
   void receive(
       const process::UPID& from,
-      const scheduler::Call& call);
+      scheduler::Call&& call);
 
   void subscribe(
       HttpConnection http,

Reply via email to