mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Changed forward<worker_ptr> to std::move in async logger
This commit is contained in:
parent
36112371c0
commit
3b009f5aa6
@ -75,13 +75,13 @@ struct async_msg
|
||||
, time(m.time)
|
||||
, thread_id(m.thread_id)
|
||||
, msg_id(m.msg_id)
|
||||
, worker_ptr(std::forward<async_logger_ptr>(worker))
|
||||
, worker_ptr(std::move(worker))
|
||||
{
|
||||
fmt_helper::append_buf(m.raw, raw);
|
||||
}
|
||||
|
||||
async_msg(async_logger_ptr &&worker, async_msg_type the_type)
|
||||
: async_msg(std::forward<async_logger_ptr>(worker), the_type, details::log_msg())
|
||||
: async_msg(std::move(worker), the_type, details::log_msg())
|
||||
{
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ public:
|
||||
|
||||
void post_log(async_logger_ptr &&worker_ptr, details::log_msg &&msg, async_overflow_policy overflow_policy)
|
||||
{
|
||||
async_msg async_m(std::forward<async_logger_ptr>(worker_ptr), async_msg_type::log, std::forward<log_msg>(msg));
|
||||
async_msg async_m(std::move(worker_ptr), async_msg_type::log, std::forward<log_msg>(msg));
|
||||
post_async_msg_(std::move(async_m), overflow_policy);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user