Used -> operator to clean up perf.cpp.

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

Branch: refs/heads/master
Commit: 7e8370cdcf7c0aff2afb295e79e153f35f6a491a
Parents: 3aecee0
Author: Benjamin Mahler <[email protected]>
Authored: Mon Aug 31 18:58:57 2015 -0700
Committer: Benjamin Mahler <[email protected]>
Committed: Mon Aug 31 19:10:16 2015 -0700

----------------------------------------------------------------------
 src/linux/perf.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7e8370cd/src/linux/perf.cpp
----------------------------------------------------------------------
diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp
index 1dda79e..dac7061 100644
--- a/src/linux/perf.cpp
+++ b/src/linux/perf.cpp
@@ -113,8 +113,8 @@ protected:
     // Kill the perf process (if it's still running) by sending
     // SIGTERM to the signal handler which will then SIGKILL the
     // perf process group created by setupChild.
-    if (perf.isSome() && perf.get().status().isPending()) {
-      kill(perf.get().pid(), SIGTERM);
+    if (perf.isSome() && perf->status().isPending()) {
+      kill(perf->pid(), SIGTERM);
     }
 
     promise.discard();
@@ -216,9 +216,9 @@ private:
     perf = _perf.get();
 
     // Wait for the process to exit.
-    await(perf.get().status(),
-          io::read(perf.get().out().get()),
-          io::read(perf.get().err().get()))
+    await(perf->status(),
+          io::read(perf->out().get()),
+          io::read(perf->err().get()))
       .onReady(defer(self(), [this](const tuple<
           Future<Option<int>>,
           Future<string>,
@@ -231,18 +231,18 @@ private:
         if (!status.isReady()) {
           error = Error("Failed to execute perf: " +
                         (status.isFailed() ? status.failure() : "discarded"));
-        } else if (status.get().isNone()) {
+        } else if (status->isNone()) {
           error = Error("Failed to execute perf: failed to reap");
-        } else if (status.get().get() != 0) {
+        } else if (status->get() != 0) {
           error = Error("Failed to execute perf: " +
-                        WSTRINGIFY(status.get().get()));
+                        WSTRINGIFY(status->get()));
         } else if (!output.isReady()) {
           error = Error("Failed to read perf output: " +
                         (output.isFailed() ? output.failure() : "discarded"));
         }
 
         if (error.isSome()) {
-          promise.fail(error.get().message);
+          promise.fail(error->message);
           terminate(self());
           return;
         }

Reply via email to