mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Fixed clang-tidy warning about implicit conversion to string_view
This commit is contained in:
@@ -45,11 +45,6 @@ struct log_msg
|
||||
mutable size_t color_range_start{0};
|
||||
mutable size_t color_range_end{0};
|
||||
|
||||
operator fmt::string_view() const SPDLOG_NOEXCEPT
|
||||
{
|
||||
return payload;
|
||||
}
|
||||
|
||||
const fmt::string_view payload;
|
||||
};
|
||||
} // namespace details
|
||||
|
||||
@@ -404,7 +404,7 @@ class v_formatter final : public flag_formatter
|
||||
{
|
||||
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
|
||||
{
|
||||
fmt_helper::append_string_view(msg, dest);
|
||||
fmt_helper::append_string_view(msg.payload, dest);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -530,7 +530,7 @@ class full_formatter final : public flag_formatter
|
||||
dest.push_back(']');
|
||||
dest.push_back(' ');
|
||||
// fmt_helper::append_string_view(msg.msg(), dest);
|
||||
fmt_helper::append_string_view(msg, dest);
|
||||
fmt_helper::append_string_view(msg.payload, dest);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -78,7 +78,7 @@ struct async_msg
|
||||
, msg_id(m.msg_id)
|
||||
, worker_ptr(std::move(worker))
|
||||
{
|
||||
fmt_helper::append_string_view(m, raw);
|
||||
fmt_helper::append_string_view(m.payload, raw);
|
||||
}
|
||||
|
||||
async_msg(async_logger_ptr &&worker, async_msg_type the_type)
|
||||
|
||||
Reference in New Issue
Block a user