mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 00:38:08 +08:00
Make thread_local for color_mode optional
This commit is contained in:
@@ -9,6 +9,12 @@
|
|||||||
#define TOML11_ERROR_MESSAGE_COLORIZED false
|
#define TOML11_ERROR_MESSAGE_COLORIZED false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TOML11_USE_THREAD_LOCAL_COLORIZATION
|
||||||
|
#define TOML11_THREAD_LOCAL_COLORIZATION thread_local
|
||||||
|
#else
|
||||||
|
#define TOML11_THREAD_LOCAL_COLORIZATION
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace toml
|
namespace toml
|
||||||
{
|
{
|
||||||
namespace color
|
namespace color
|
||||||
@@ -44,7 +50,7 @@ class color_mode
|
|||||||
|
|
||||||
inline color_mode& color_status() noexcept
|
inline color_mode& color_status() noexcept
|
||||||
{
|
{
|
||||||
static thread_local color_mode status;
|
static TOML11_THREAD_LOCAL_COLORIZATION color_mode status;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user