You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2018/07/23 22:36:26 UTC
mesos git commit: Made getters in the Slave class in the allocator
return references.
Repository: mesos
Updated Branches:
refs/heads/master 1dde95311 -> 74f930101
Made getters in the Slave class in the allocator return references.
This eliminates some unnecessary copies.
Review: https://reviews.apache.org/r/67945/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/74f93010
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/74f93010
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/74f93010
Branch: refs/heads/master
Commit: 74f9301014cc4671dfec8d9ecc2e8229c4598046
Parents: 1dde953
Author: Meng Zhu <mz...@mesosphere.io>
Authored: Mon Jul 23 15:36:10 2018 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Mon Jul 23 15:36:10 2018 -0700
----------------------------------------------------------------------
src/master/allocator/mesos/hierarchical.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/74f93010/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index 43278a9..c1a6789 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -382,11 +382,11 @@ protected:
available = total - allocated_;
}
- Resources getTotal() const { return total; }
+ const Resources& getTotal() const { return total; }
- Resources getAllocated() const { return allocated; }
+ const Resources& getAllocated() const { return allocated; }
- Resources getAvailable() const { return available; }
+ const Resources& getAvailable() const { return available; }
void updateTotal(const Resources& newTotal) {
total = newTotal;