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/daemon/fw/algorithm.cpp b/daemon/fw/algorithm.cpp
index a5d692f..a4d864b 100644
--- a/daemon/fw/algorithm.cpp
+++ b/daemon/fw/algorithm.cpp
@@ -84,7 +84,7 @@
bool
hasPendingOutRecords(const pit::Entry& pitEntry)
{
- time::steady_clock::TimePoint now = time::steady_clock::now();
+ auto now = time::steady_clock::now();
return std::any_of(pitEntry.out_begin(), pitEntry.out_end(),
[&now] (const pit::OutRecord& outRecord) {
return outRecord.getExpiry() >= now &&
@@ -92,7 +92,7 @@
});
}
-time::steady_clock::TimePoint
+time::steady_clock::time_point
getLastOutgoing(const pit::Entry& pitEntry)
{
pit::OutRecordCollection::const_iterator lastOutgoing = std::max_element(
@@ -111,7 +111,7 @@
const shared_ptr<pit::Entry>& pitEntry)
{
auto found = nexthops.end();
- auto earliestRenewed = time::steady_clock::TimePoint::max();
+ auto earliestRenewed = time::steady_clock::time_point::max();
for (auto it = nexthops.begin(); it != nexthops.end(); ++it) {
if (!isNextHopEligible(inFace, interest, *it, pitEntry))
@@ -132,7 +132,7 @@
const fib::NextHop& nexthop,
const shared_ptr<pit::Entry>& pitEntry,
bool wantUnused,
- time::steady_clock::TimePoint now)
+ time::steady_clock::time_point now)
{
const Face& outFace = nexthop.getFace();