Skip to content

Commit

Permalink
Restore init thread-local var in mdc.h, not use reference-init
Browse files Browse the repository at this point in the history
  • Loading branch information
lixingcong committed Aug 20, 2024
1 parent d89fff6 commit 8841b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/spdlog/mdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SPDLOG_API mdc {
static void clear() { get_context().clear(); }

static mdc_map_t &get_context() {
static thread_local mdc_map_t& context = *new mdc_map_t;
static thread_local mdc_map_t context;
return context;
}
};
Expand Down

0 comments on commit 8841b7e

Please sign in to comment.