Revert "Ensure flush callback gets called in move-assign operator (#3232)"

This reverts commit b6da59447f.
This commit is contained in:
gabime 2024-11-01 10:41:27 +02:00
parent b6da59447f
commit 48ce4a94b3

View File

@ -49,12 +49,12 @@ struct async_msg : log_msg_buffer {
flush_callback(std::move(other.flush_callback)) {
other.flush_callback = nullptr;
}
async_msg &operator=(async_msg &&other) SPDLOG_NOEXCEPT {
*static_cast<log_msg_buffer *>(this) = static_cast<log_msg_buffer&&>(other);
msg_type = other.msg_type;
worker_ptr = std::move(other.worker_ptr);
std::swap(flush_callback, other.flush_callback);
flush_callback = std::move(other.flush_callback);
other.flush_callback = nullptr;
return *this;
}