Micro-optimize level checking by inlining

This commit is contained in:
gabime
2019-11-03 17:04:34 +02:00
parent 3ee4f2810d
commit bf40855825
2 changed files with 8 additions and 12 deletions

View File

@@ -64,16 +64,6 @@ SPDLOG_INLINE void swap(logger &a, logger &b)
a.swap(b);
}
SPDLOG_INLINE bool logger::should_log(level::level_enum msg_level) const
{
return msg_level >= level_.load(std::memory_order_relaxed);
}
SPDLOG_INLINE bool logger::should_backtrace() const
{
return tracer_.enabled();
}
SPDLOG_INLINE void logger::set_level(level::level_enum log_level)
{
level_.store(log_level);