Improve and simplify code with modern C++ features
Change-Id: I28d84df3087492ab2ecbeb91169a2cde12c9e31e
diff --git a/src/util/logging.cpp b/src/util/logging.cpp
index 0e68092..9513bfb 100644
--- a/src/util/logging.cpp
+++ b/src/util/logging.cpp
@@ -52,7 +52,7 @@
Logging::Logging()
{
- this->setDestinationImpl(shared_ptr<std::ostream>(&std::clog, bind([]{})));
+ this->setDestinationImpl(shared_ptr<std::ostream>(&std::clog, [] (auto) {}));
const char* environ = std::getenv("NDN_LOG");
if (environ != nullptr) {
@@ -202,7 +202,7 @@
void
Logging::setDestination(std::ostream& os)
{
- setDestination(shared_ptr<std::ostream>(&os, bind([]{})));
+ setDestination(shared_ptr<std::ostream>(&os, [] (auto) {}));
}
void
@@ -214,7 +214,7 @@
auto backend = boost::make_shared<boost::log::sinks::text_ostream_backend>();
backend->auto_flush(true);
- backend->add_stream(boost::shared_ptr<std::ostream>(m_destination.get(), bind([]{})));
+ backend->add_stream(boost::shared_ptr<std::ostream>(m_destination.get(), [] (auto) {}));
if (m_sink != nullptr) {
boost::log::core::get()->remove_sink(m_sink);