core: drop std::function and ndn::Exclude from common.hpp, add ndn::optional
Change-Id: Ie3983d8b6f9929430efd8ada8d942e3f95755cd4
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index d0498e5..eb102eb 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -64,11 +64,11 @@
* \retval nullopt last Interest is not the expected command
* \return command parameters
*/
- static ndn::optional<ControlParameters>
+ static optional<ControlParameters>
parseCommand(const Interest& interest, const Name& expectedPrefix)
{
if (!expectedPrefix.isPrefixOf(interest.getName())) {
- return ndn::nullopt;
+ return nullopt;
}
return ControlParameters(interest.getName().at(expectedPrefix.size()).blockFromValue());
}
diff --git a/tests/tools/nfdc/status-report.t.cpp b/tests/tools/nfdc/status-report.t.cpp
index fbe212c..5cd25f9 100644
--- a/tests/tools/nfdc/status-report.t.cpp
+++ b/tests/tools/nfdc/status-report.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -69,11 +69,11 @@
m_delay = delay;
}
- virtual void
+ void
fetchStatus(Controller& controller,
- const function<void()>& onSuccess,
+ const std::function<void()>& onSuccess,
const Controller::DatasetFailCallback& onFailure,
- const CommandOptions& options) override
+ const CommandOptions& options) final
{
++nFetchStatusCalls;
scheduler::schedule(m_delay, [=] {
@@ -86,14 +86,14 @@
});
}
- virtual void
- formatStatusXml(std::ostream& os) const override
+ void
+ formatStatusXml(std::ostream& os) const final
{
os << '<' << m_moduleName << "/>";
}
- virtual void
- formatStatusText(std::ostream& os) const override
+ void
+ formatStatusText(std::ostream& os) const final
{
os << m_moduleName << '\n';
}
@@ -110,7 +110,7 @@
class StatusReportTester : public StatusReport
{
private:
- virtual void
+ void
processEvents(Face&) override
{
processEventsFunc();