Repository: mesos
Updated Branches:
  refs/heads/master 11f2f7ef3 -> 63728ddf4


Removed redundant get() call on Owned pointers.


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

Branch: refs/heads/master
Commit: 63728ddf46d69735f57f88ecafd1eaa9504e8244
Parents: 11f2f7e
Author: Jiang Yan Xu <[email protected]>
Authored: Fri Dec 1 22:47:14 2017 -0800
Committer: Jiang Yan Xu <[email protected]>
Committed: Fri Dec 1 22:48:25 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/63728ddf/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index d1138a2..bb040ce 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -330,7 +330,7 @@ struct FullFrameworkWriter {
       foreachvalue (const Owned<Task>& task, framework_->unreachableTasks) {
         // There could be TASK_LOST tasks in this map. See comment for
         // `unreachableTasks`.
-        if (task.get()->state() != TASK_UNREACHABLE) {
+        if (task->state() != TASK_UNREACHABLE) {
           continue;
         }
 
@@ -357,7 +357,7 @@ struct FullFrameworkWriter {
       // have been stored as TASK_LOST for backward compatibility so we
       // should export them as completed tasks.
       foreachvalue (const Owned<Task>& task, framework_->unreachableTasks) {
-        if (task.get()->state() != TASK_LOST) {
+        if (task->state() != TASK_LOST) {
           continue;
         }
 
@@ -4243,7 +4243,7 @@ mesos::master::Response::GetTasks Master::Http::_getTasks(
         continue;
       }
 
-      if (task.get()->state() == TASK_UNREACHABLE) {
+      if (task->state() == TASK_UNREACHABLE) {
         getTasks.add_unreachable_tasks()->CopyFrom(*task);
       } else {
         // Unreachable tasks belonging to a non-partition-aware framework

http://git-wip-us.apache.org/repos/asf/mesos/blob/63728ddf/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 309cd10..883793a 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -10644,7 +10644,7 @@ double Master::_tasks_unreachable()
 
   foreachvalue (Framework* framework, frameworks.registered) {
     foreachvalue (const Owned<Task>& task, framework->unreachableTasks) {
-      if (task.get()->state() == TASK_UNREACHABLE) {
+      if (task->state() == TASK_UNREACHABLE) {
         count++;
       }
     }

Reply via email to