mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
Fix atomic level
This commit is contained in:
parent
392917f855
commit
3a405ba958
@ -172,7 +172,7 @@ enum class log_level
|
|||||||
n_levels
|
n_levels
|
||||||
};
|
};
|
||||||
|
|
||||||
#if not defined(SPDLOG_NO_ATOMIC_LEVELS)
|
#if defined(SPDLOG_NO_ATOMIC_LEVELS)
|
||||||
using level_t = details::null_atomic_log_level;
|
using level_t = details::null_atomic_log_level;
|
||||||
#else
|
#else
|
||||||
using level_t = std::atomic<log_level>;
|
using level_t = std::atomic<log_level>;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
// null, no cost dummy "mutex" and dummy "atomic" int
|
// null, no cost dummy "mutex" and dummy "atomic" log level
|
||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
enum class log_level; // forward declaration
|
enum class log_level; // forward declaration
|
||||||
@ -21,7 +21,6 @@ struct null_mutex
|
|||||||
struct null_atomic_log_level
|
struct null_atomic_log_level
|
||||||
{
|
{
|
||||||
spdlog::log_level value;
|
spdlog::log_level value;
|
||||||
null_atomic_log_level() = default;
|
|
||||||
|
|
||||||
explicit null_atomic_log_level(spdlog::log_level new_value)
|
explicit null_atomic_log_level(spdlog::log_level new_value)
|
||||||
: value(new_value)
|
: value(new_value)
|
||||||
|
Loading…
Reference in New Issue
Block a user