Reduce usage of std::bind()
C++14 lambdas are easier to read, easier to debug,
and can usually be better optimized by the compiler.
Change-Id: I294f275904f91942a8de946fe63e77078a7608a6
diff --git a/tests/daemon/face/face.t.cpp b/tests/daemon/face/face.t.cpp
index b592a24..641088f 100644
--- a/tests/daemon/face/face.t.cpp
+++ b/tests/daemon/face/face.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -101,9 +101,9 @@
size_t nReceivedInterests = 0;
size_t nReceivedData = 0;
size_t nReceivedNacks = 0;
- face1->afterReceiveInterest.connect(bind([&nReceivedInterests] { ++nReceivedInterests; }));
- face1->afterReceiveData.connect(bind([&nReceivedData] { ++nReceivedData; }));
- face1->afterReceiveNack.connect(bind([&nReceivedNacks] { ++nReceivedNacks; }));
+ face1->afterReceiveInterest.connect([&] (auto&&...) { ++nReceivedInterests; });
+ face1->afterReceiveData.connect([&] (auto&&...) { ++nReceivedData; });
+ face1->afterReceiveNack.connect([&] (auto&&...) { ++nReceivedNacks; });
for (size_t i = 0; i < nInInterests; ++i) {
face1->receiveInterest(*makeInterest("/JSQdqward4"), 0);