Repository: mesos
Updated Branches:
  refs/heads/master ce5097ff8 -> 50174e95b


Clarified a variable name.


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

Branch: refs/heads/master
Commit: 50174e95bab4609a6ec14821c1faebdf0dd7e875
Parents: ce5097f
Author: Benjamin Mahler <[email protected]>
Authored: Fri Jun 26 11:35:43 2015 -0700
Committer: Benjamin Mahler <[email protected]>
Committed: Fri Jun 26 11:35:43 2015 -0700

----------------------------------------------------------------------
 src/common/http.cpp             |  6 +++---
 src/common/http.hpp             |  2 +-
 src/tests/common/http_tests.cpp | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/50174e95/src/common/http.cpp
----------------------------------------------------------------------
diff --git a/src/common/http.cpp b/src/common/http.cpp
index 1585999..73a4de1 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -80,12 +80,12 @@ JSON::Object model(const Resources& resources)
 }
 
 
-JSON::Object model(const hashmap<string, Resources>& resourcesMap)
+JSON::Object model(const hashmap<string, Resources>& roleResources)
 {
   JSON::Object object;
 
-  foreachpair (const string& key, const Resources& resources, resourcesMap) {
-    object.values[key] = model(resources);
+  foreachpair (const string& role, const Resources& resources, roleResources) {
+    object.values[role] = model(resources);
   }
 
   return object;

http://git-wip-us.apache.org/repos/asf/mesos/blob/50174e95/src/common/http.hpp
----------------------------------------------------------------------
diff --git a/src/common/http.hpp b/src/common/http.hpp
index c400848..bbd063d 100644
--- a/src/common/http.hpp
+++ b/src/common/http.hpp
@@ -37,7 +37,7 @@ class Task;
 
 
 JSON::Object model(const Resources& resources);
-JSON::Object model(const hashmap<std::string, Resources>& resourcesMap);
+JSON::Object model(const hashmap<std::string, Resources>& roleResources);
 JSON::Object model(const Attributes& attributes);
 JSON::Object model(const CommandInfo& command);
 JSON::Object model(const ExecutorInfo& executorInfo);

http://git-wip-us.apache.org/repos/asf/mesos/blob/50174e95/src/tests/common/http_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/common/http_tests.cpp b/src/tests/common/http_tests.cpp
index 40872eb..a30d38a 100644
--- a/src/tests/common/http_tests.cpp
+++ b/src/tests/common/http_tests.cpp
@@ -151,18 +151,18 @@ TEST(HTTP, ModelResources)
 
 
 // This test verifies that ResourcesMap model are divided by keys.
-TEST(HTTP, ModelResourcesMap)
+TEST(HTTP, ModelRoleResources)
 {
   Resources fooResources = Resources::parse(
       "cpus(foo):1;ports(foo):[1-10]").get();
   Resources barResources = Resources::parse(
       "mem(bar):512;disk(bar):1024").get();
 
-  hashmap<std::string, Resources> resourcesMap;
-  resourcesMap["foo"] = fooResources;
-  resourcesMap["bar"] = barResources;
+  hashmap<std::string, Resources> roleResources;
+  roleResources["foo"] = fooResources;
+  roleResources["bar"] = barResources;
 
-  JSON::Value object = model(resourcesMap);
+  JSON::Value object = model(roleResources);
 
   Try<JSON::Value> expected = JSON::parse(
       "{"

Reply via email to