mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-27 16:09:05 +08:00
micro optimization in log_msg constructor
This commit is contained in:
parent
da2af6ea2e
commit
607779cccf
@ -16,17 +16,18 @@ namespace details {
|
|||||||
struct log_msg
|
struct log_msg
|
||||||
{
|
{
|
||||||
log_msg() = default;
|
log_msg() = default;
|
||||||
|
|
||||||
log_msg(const std::string *loggers_name, level::level_enum lvl)
|
log_msg(const std::string *loggers_name, level::level_enum lvl)
|
||||||
: logger_name(loggers_name)
|
: logger_name(loggers_name)
|
||||||
, level(lvl)
|
, level(lvl)
|
||||||
{
|
|
||||||
#ifndef SPDLOG_NO_DATETIME
|
#ifndef SPDLOG_NO_DATETIME
|
||||||
time = os::now();
|
, time(os::now())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SPDLOG_NO_THREAD_ID
|
#ifndef SPDLOG_NO_THREAD_ID
|
||||||
thread_id = os::thread_id();
|
, thread_id(os::thread_id())
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
log_msg(const log_msg &other) = delete;
|
log_msg(const log_msg &other) = delete;
|
||||||
|
Loading…
Reference in New Issue
Block a user