mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 14:42:13 +08:00
Fixed clang warnings
This commit is contained in:
parent
b057b979fa
commit
87ec1ab97b
@ -73,7 +73,8 @@ protected:
|
|||||||
bool enable_formatting_ = false;
|
bool enable_formatting_ = false;
|
||||||
|
|
||||||
private:
|
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
|
// must store the ident because the man says openlog might use the pointer as
|
||||||
// is and not a string copy
|
// is and not a string copy
|
||||||
const std::string ident_;
|
const std::string ident_;
|
||||||
@ -83,7 +84,7 @@ private:
|
|||||||
//
|
//
|
||||||
int syslog_prio_from_level(const details::log_msg &msg) const
|
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));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,7 +38,8 @@ public:
|
|||||||
systemd_sink &operator=(const systemd_sink &) = delete;
|
systemd_sink &operator=(const systemd_sink &) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::array<int, 7> syslog_levels_;
|
using levels_array = std::array<int, 7>;
|
||||||
|
levels_array syslog_levels_;
|
||||||
|
|
||||||
void sink_it_(const details::log_msg &msg) override
|
void sink_it_(const details::log_msg &msg) override
|
||||||
{
|
{
|
||||||
@ -72,7 +73,7 @@ protected:
|
|||||||
|
|
||||||
int syslog_level(level::level_enum l)
|
int syslog_level(level::level_enum l)
|
||||||
{
|
{
|
||||||
return syslog_levels_.at(static_cast<int>(l));
|
return syslog_levels_.at(static_cast<levels_array::size_type>(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
void flush_() override {}
|
void flush_() override {}
|
||||||
|
Loading…
Reference in New Issue
Block a user