From 49e45d532f80c6ffc60c2fbd754030a11dfc8893 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 21 Feb 2017 15:58:47 +0100 Subject: Use nullptr instead of NULL Signed-off-by: Szczepan Zalega --- include/log.h | 2 +- log.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/log.h b/include/log.h index a3e8281..7c25918 100644 --- a/include/log.h +++ b/include/log.h @@ -34,7 +34,7 @@ class Log { Log() : mp_loghandler(&stdlog_handler), m_loglevel(Loglevel::WARNING) {} static Log &instance() { - if (mp_instance == NULL) mp_instance = new Log; + if (mp_instance == nullptr) mp_instance = new Log; return *mp_instance; } diff --git a/log.cc b/log.cc index 5889a1e..70853fc 100644 --- a/log.cc +++ b/log.cc @@ -7,7 +7,7 @@ namespace nitrokey { namespace log { -Log *Log::mp_instance = NULL; +Log *Log::mp_instance = nullptr; StdlogHandler stdlog_handler; std::string LogHandler::loglevel_to_str(Loglevel lvl) { @@ -27,7 +27,7 @@ std::string LogHandler::loglevel_to_str(Loglevel lvl) { } void Log::operator()(const std::string &logstr, Loglevel lvl) { - if (mp_loghandler != NULL) + if (mp_loghandler != nullptr) if ((int)(lvl) >= (int)(m_loglevel)) mp_loghandler->print(logstr, lvl); } -- cgit v1.2.1