Eradicate all uses of std::bind()
Change-Id: I6e1ccf2d87b76142e6d519c1a288d03022e4d167
diff --git a/tools/ping/server/ping-server.cpp b/tools/ping/server/ping-server.cpp
index ad8177c..5ceeb76 100644
--- a/tools/ping/server/ping-server.cpp
+++ b/tools/ping/server/ping-server.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2015-2019, Arizona Board of Regents.
+ * Copyright (c) 2015-2021, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -42,12 +42,11 @@
void
PingServer::start()
{
- m_registeredPrefix = m_face.setInterestFilter(
- Name(m_options.prefix).append("ping"),
- bind(&PingServer::onInterest, this, _2),
- [] (const auto&, const auto& reason) {
- NDN_THROW(std::runtime_error("Failed to register prefix: " + reason));
- });
+ m_registeredPrefix = m_face.setInterestFilter(Name(m_options.prefix).append("ping"),
+ [this] (const auto&, const auto& interest) { onInterest(interest); },
+ [] (const auto&, const auto& reason) {
+ NDN_THROW(std::runtime_error("Failed to register prefix: " + reason));
+ });
}
void