Exchanged use of boost::tuple with tuples::tuple. Review: https://reviews.apache.org/r/18836
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/719be250 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/719be250 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/719be250 Branch: refs/heads/master Commit: 719be2502854234a67fe1708e428d147e42bf0e0 Parents: a6497b3 Author: Till Toenshoff <[email protected]> Authored: Thu Mar 6 10:10:40 2014 -0800 Committer: Benjamin Mahler <[email protected]> Committed: Thu Mar 6 10:10:40 2014 -0800 ---------------------------------------------------------------------- src/zookeeper/zookeeper.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/719be250/src/zookeeper/zookeeper.cpp ---------------------------------------------------------------------- diff --git a/src/zookeeper/zookeeper.cpp b/src/zookeeper/zookeeper.cpp index f90515d..e27312d 100644 --- a/src/zookeeper/zookeeper.cpp +++ b/src/zookeeper/zookeeper.cpp @@ -21,8 +21,6 @@ #include <iostream> #include <map> -#include <boost/tuple/tuple.hpp> - #include <process/dispatch.hpp> #include <process/once.hpp> #include <process/process.hpp> @@ -32,11 +30,10 @@ #include <stout/foreach.hpp> #include <stout/path.hpp> #include <stout/strings.hpp> +#include <stout/tuple.hpp> #include "zookeeper/zookeeper.hpp" -using boost::tuple; - using process::Future; using process::PID; using process::Process; @@ -46,6 +43,8 @@ using std::map; using std::string; using std::vector; +using tuples::tuple; + class ZooKeeperImpl { @@ -249,7 +248,7 @@ private: const tuple<Promise<int>*>* args = reinterpret_cast<const tuple<Promise<int>*>*>(data); - Promise<int>* promise = (*args).get<0>(); + Promise<int>* promise = tuples::get<0>(*args); promise->set(ret); @@ -263,8 +262,8 @@ private: const tuple<Promise<int>*, string*> *args = reinterpret_cast<const tuple<Promise<int>*, string*>*>(data); - Promise<int>* promise = (*args).get<0>(); - string* result = (*args).get<1>(); + Promise<int>* promise = tuples::get<0>(*args); + string* result = tuples::get<1>(*args); if (ret == 0) { if (result != NULL) { @@ -284,8 +283,8 @@ private: const tuple<Promise<int>*, Stat*>* args = reinterpret_cast<const tuple<Promise<int>*, Stat*>*>(data); - Promise<int>* promise = (*args).get<0>(); - Stat *stat_result = (*args).get<1>(); + Promise<int>* promise = tuples::get<0>(*args); + Stat *stat_result = tuples::get<1>(*args); if (ret == 0) { if (stat_result != NULL) { @@ -310,9 +309,9 @@ private: const tuple<Promise<int>*, string*, Stat*>* args = reinterpret_cast<const tuple<Promise<int>*, string*, Stat*>*>(data); - Promise<int>* promise = (*args).get<0>(); - string* result = (*args).get<1>(); - Stat* stat_result = (*args).get<2>(); + Promise<int>* promise = tuples::get<0>(*args); + string* result = tuples::get<1>(*args); + Stat* stat_result = tuples::get<2>(*args); if (ret == 0) { if (result != NULL) { @@ -339,8 +338,8 @@ private: const tuple<Promise<int>*, vector<string>*>* args = reinterpret_cast<const tuple<Promise<int>*, vector<string>*>*>(data); - Promise<int>* promise = (*args).get<0>(); - vector<string>* results = (*args).get<1>(); + Promise<int>* promise = tuples::get<0>(*args); + vector<string>* results = tuples::get<1>(*args); if (ret == 0) { if (results != NULL) {
