mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
use default move constructor/assignment for async_log_helper
This commit is contained in:
parent
c7864ae5dc
commit
e248895254
@ -52,28 +52,13 @@ class async_log_helper
|
|||||||
|
|
||||||
async_msg() = default;
|
async_msg() = default;
|
||||||
~async_msg() = default;
|
~async_msg() = default;
|
||||||
|
async_msg(async_msg&& ) = default;
|
||||||
async_msg(async_msg&& other) SPDLOG_NOEXCEPT:
|
|
||||||
logger_name(std::move(other.logger_name)),
|
|
||||||
level(std::move(other.level)),
|
|
||||||
time(std::move(other.time)),
|
|
||||||
txt(std::move(other.txt)),
|
|
||||||
msg_type(std::move(other.msg_type))
|
|
||||||
{}
|
|
||||||
|
|
||||||
async_msg(async_msg_type m_type) :msg_type(m_type)
|
async_msg(async_msg_type m_type) :msg_type(m_type)
|
||||||
{};
|
{};
|
||||||
|
|
||||||
async_msg& operator=(async_msg&& other) SPDLOG_NOEXCEPT
|
async_msg& operator=(async_msg&& ) = default;
|
||||||
{
|
|
||||||
logger_name = std::move(other.logger_name);
|
|
||||||
level = other.level;
|
|
||||||
time = std::move(other.time);
|
|
||||||
thread_id = other.thread_id;
|
|
||||||
txt = std::move(other.txt);
|
|
||||||
msg_type = other.msg_type;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
// never copy or assign. should only be moved..
|
// never copy or assign. should only be moved..
|
||||||
async_msg(const async_msg&) = delete;
|
async_msg(const async_msg&) = delete;
|
||||||
async_msg& operator=(async_msg& other) = delete;
|
async_msg& operator=(async_msg& other) = delete;
|
||||||
|
Loading…
Reference in New Issue
Block a user