mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 18:11:33 +08:00
Micro optimize: don't init log_msg.msg_id on construction. It will be set anyway later
This commit is contained in:
parent
aa47ac85c9
commit
1b8bf35acc
@ -39,7 +39,7 @@ struct log_msg
|
|||||||
log_clock::time_point time;
|
log_clock::time_point time;
|
||||||
size_t thread_id;
|
size_t thread_id;
|
||||||
fmt::memory_buffer raw;
|
fmt::memory_buffer raw;
|
||||||
size_t msg_id{0};
|
size_t msg_id;
|
||||||
|
|
||||||
// info about wrapping the formatted text with color (updated by pattern_formatter).
|
// info about wrapping the formatted text with color (updated by pattern_formatter).
|
||||||
mutable size_t color_range_start{0};
|
mutable size_t color_range_start{0};
|
||||||
|
@ -714,11 +714,11 @@ private:
|
|||||||
case ('P'):
|
case ('P'):
|
||||||
formatters_.push_back(details::make_unique<details::pid_formatter>());
|
formatters_.push_back(details::make_unique<details::pid_formatter>());
|
||||||
break;
|
break;
|
||||||
|
#ifdef SPDLOG_ENABLE_MESSAGE_COUNTER
|
||||||
case ('i'):
|
case ('i'):
|
||||||
formatters_.push_back(details::make_unique<details::i_formatter>());
|
formatters_.push_back(details::make_unique<details::i_formatter>());
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case ('^'):
|
case ('^'):
|
||||||
formatters_.push_back(details::make_unique<details::color_start_formatter>());
|
formatters_.push_back(details::make_unique<details::color_start_formatter>());
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user