summaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-09-14 08:27:06 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-09-14 09:17:05 +0000
commit64c979a2ebf12042696a45de8c4bbfeb160e1122 (patch)
tree725ee4b829f996386ab6ae3207277f97e84ba615 /filedistribution
parent57537cfbe54b5b0a01edc6d118e544f463d07d49 (diff)
c++11 lambdas
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/tests/lib/mock-zookeeper.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/filedistribution/src/tests/lib/mock-zookeeper.cpp b/filedistribution/src/tests/lib/mock-zookeeper.cpp
index 79d4117ef10..f3cdd568e1e 100644
--- a/filedistribution/src/tests/lib/mock-zookeeper.cpp
+++ b/filedistribution/src/tests/lib/mock-zookeeper.cpp
@@ -136,10 +136,7 @@ ZHandle::getParent(const string& childPath)
void
Node::triggerWatches(zhandle_t* zh, const std::string& path) {
for (auto i = watchers.begin(); i != watchers.end(); ++i) {
- ((ZHandle*)zh)->watcherInvocations.push(std::bind(i->first, zh, \
- /*TODO: type, state*/ 0, 0,
- std::bind(&string::c_str, path),
- i->second));
+ ((ZHandle*)zh)->watcherInvocations.push([zh, i, path] () { i->first(zh, 0, 0, path.c_str(), i->second); });
}
watchers.clear();
}