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/tools/nfdc/status.cpp b/tools/nfdc/status.cpp
index 441c3a9..a338b1d 100644
--- a/tools/nfdc/status.cpp
+++ b/tools/nfdc/status.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,
@@ -128,25 +128,29 @@
CommandDefinition defStatusShow("status", "show");
defStatusShow
.setTitle("print general status");
- parser.addCommand(defStatusShow, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantForwarderGeneral));
+ parser.addCommand(defStatusShow,
+ std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantForwarderGeneral));
parser.addAlias("status", "show", "");
CommandDefinition defChannelList("channel", "list");
defChannelList
.setTitle("print channel list");
- parser.addCommand(defChannelList, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantChannels));
+ parser.addCommand(defChannelList,
+ std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantChannels));
parser.addAlias("channel", "list", "");
CommandDefinition defFibList("fib", "list");
defFibList
.setTitle("print FIB entries");
- parser.addCommand(defFibList, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantFib));
+ parser.addCommand(defFibList,
+ std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantFib));
parser.addAlias("fib", "list", "");
CommandDefinition defCsInfo("cs", "info");
defCsInfo
.setTitle("print CS information");
- parser.addCommand(defCsInfo, bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantCs));
+ parser.addCommand(defCsInfo,
+ std::bind(&reportStatusSingleSection, _1, &StatusReportOptions::wantCs));
parser.addAlias("cs", "info", "");
}