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 2015/02/11 19:51:51 UTC

mesos git commit: Removed non-POD static function object in clock.

Repository: mesos
Updated Branches:
  refs/heads/master 501f8979f -> d8ae6c863


Removed non-POD static function object in clock.

Review: https://reviews.apache.org/r/30884


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

Branch: refs/heads/master
Commit: d8ae6c863f95b8a06320a81cd5fd055e194fa4e2
Parents: 501f897
Author: Benjamin Mahler <be...@gmail.com>
Authored: Wed Feb 11 10:38:00 2015 -0800
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Wed Feb 11 10:51:39 2015 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/clock.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d8ae6c86/3rdparty/libprocess/src/clock.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/clock.cpp b/3rdparty/libprocess/src/clock.cpp
index fcc1eb0..f3fe6dc 100644
--- a/3rdparty/libprocess/src/clock.cpp
+++ b/3rdparty/libprocess/src/clock.cpp
@@ -53,7 +53,8 @@ bool paused = false;
 bool settling = false;
 
 // Lambda function to invoke when timers have expired.
-lambda::function<void(const list<Timer>&)> callback;
+lambda::function<void(const list<Timer>&)>* callback =
+    new lambda::function<void(const list<Timer>&)>();
 
 
 // Helper for determining the duration until the next timer elapses,
@@ -126,7 +127,7 @@ void tick()
     }
   }
 
-  clock::callback(timedout);
+  (*clock::callback)(timedout);
 
   // Mark 'settling' as false since there are not any more timers
   // that will expire before the paused time and we've finished
@@ -144,7 +145,7 @@ void tick()
 
 void Clock::initialize(lambda::function<void(const list<Timer>&)>&& callback)
 {
-  clock::callback = callback;
+  (*clock::callback) = callback;
 }