Changed forward<worker_ptr> to std::move in async logger

This commit is contained in:
gabime 2018-10-05 14:33:53 +03:00
parent 36112371c0
commit 3b009f5aa6

View File

@ -75,13 +75,13 @@ struct async_msg
, time(m.time) , time(m.time)
, thread_id(m.thread_id) , thread_id(m.thread_id)
, msg_id(m.msg_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); fmt_helper::append_buf(m.raw, raw);
} }
async_msg(async_logger_ptr &&worker, async_msg_type the_type) 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) 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); post_async_msg_(std::move(async_m), overflow_policy);
} }