Repository: mesos
Updated Branches:
  refs/heads/master 491371c77 -> e17deb66b


Added a missing comment in v1/resources.cpp.


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

Branch: refs/heads/master
Commit: e17deb66bfffe106173f00f06cb1a58624775772
Parents: 491371c
Author: Jiang Yan Xu <xuj...@apple.com>
Authored: Fri Sep 16 16:26:45 2016 -0700
Committer: Jiang Yan Xu <xuj...@apple.com>
Committed: Fri Sep 16 16:26:45 2016 -0700

----------------------------------------------------------------------
 src/v1/resources.cpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e17deb66/src/v1/resources.cpp
----------------------------------------------------------------------
diff --git a/src/v1/resources.cpp b/src/v1/resources.cpp
index aefba49..7c4db44 100644
--- a/src/v1/resources.cpp
+++ b/src/v1/resources.cpp
@@ -1099,6 +1099,8 @@ Try<Resources> Resources::flatten(
   Resources flattened;
 
   foreach (Resource_ resource_, resources) {
+    // With the above checks, we are certain that `resource_` will
+    // remain valid after the modifications.
     resource_.resource.set_role(role);
     if (reservation.isNone()) {
       resource_.resource.clear_reservation();

Reply via email to