From 06ef01f867c8c254f84741053a32ea9ae66c21a0 Mon Sep 17 00:00:00 2001 From: gabi Date: Wed, 7 Jan 2015 12:35:43 +0200 Subject: [PATCH] use std::memory_order_relaxed when reading logger's level --- include/spdlog/details/logger_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h index e624dbb9..1a920c03 100644 --- a/include/spdlog/details/logger_impl.h +++ b/include/spdlog/details/logger_impl.h @@ -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(_level.load()); + return static_cast(_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); } //