Fixed clang warnings

This commit is contained in:
gabime
2019-08-19 12:06:29 +03:00
parent b057b979fa
commit 87ec1ab97b
2 changed files with 6 additions and 4 deletions

View File

@@ -73,7 +73,8 @@ protected:
bool enable_formatting_ = false;
private:
std::array<int, 7> syslog_levels_;
using levels_array = std::array<int, 7>;
levels_array syslog_levels_;
// must store the ident because the man says openlog might use the pointer as
// is and not a string copy
const std::string ident_;
@@ -83,7 +84,7 @@ private:
//
int syslog_prio_from_level(const details::log_msg &msg) const
{
return syslog_levels_.at(static_cast<int>(msg.level));
return syslog_levels_.at(static_cast<levels_array::size_type>(msg.level));
}
};