Commit 06ef01f8 authored by gabi's avatar gabi

use std::memory_order_relaxed when reading logger's level

parent 4fd1ac8a
......@@ -285,12 +285,12 @@ inline void spdlog::logger::set_level(spdlog::level::level_enum log_level)
inline spdlog::level::level_enum spdlog::logger::level() const
{
return static_cast<spdlog::level::level_enum>(_level.load());
return static_cast<spdlog::level::level_enum>(_level.load(std::memory_order_relaxed));
}
inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) const
{
return msg_level >= _level.load();
return msg_level >= _level.load(std::memory_order_relaxed);
}
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment