From d044369e3b4e064f9e67d99c8c8cb1bbc6ecfc86 Mon Sep 17 00:00:00 2001 From: Thiago Bastos Date: Mon, 5 Mar 2018 20:00:48 +0100 Subject: [PATCH] Fix implicit conversion warnings (-Wsign-conversion) --- include/spdlog/sinks/syslog_sink.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index 98fad055..d1ffc5c8 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -33,13 +33,13 @@ public: syslog_sink(const std::string& ident = "", int syslog_option=0, int syslog_facility=LOG_USER): _ident(ident) { - _priorities[static_cast(level::trace)] = LOG_DEBUG; - _priorities[static_cast(level::debug)] = LOG_DEBUG; - _priorities[static_cast(level::info)] = LOG_INFO; - _priorities[static_cast(level::warn)] = LOG_WARNING; - _priorities[static_cast(level::err)] = LOG_ERR; - _priorities[static_cast(level::critical)] = LOG_CRIT; - _priorities[static_cast(level::off)] = LOG_INFO; + _priorities[static_cast(level::trace)] = LOG_DEBUG; + _priorities[static_cast(level::debug)] = LOG_DEBUG; + _priorities[static_cast(level::info)] = LOG_INFO; + _priorities[static_cast(level::warn)] = LOG_WARNING; + _priorities[static_cast(level::err)] = LOG_ERR; + _priorities[static_cast(level::critical)] = LOG_CRIT; + _priorities[static_cast(level::off)] = LOG_INFO; //set ident to be program name if empty ::openlog(_ident.empty()? nullptr:_ident.c_str(), syslog_option, syslog_facility); @@ -73,7 +73,7 @@ private: // int syslog_prio_from_level(const details::log_msg &msg) const { - return _priorities[static_cast(msg.level)]; + return _priorities[static_cast(msg.level)]; } }; }