Commit 70bef682 authored by gabime's avatar gabime

Fixed clang-tidy warning about implicit conversion to string_view

parent c2a9bf99
...@@ -45,11 +45,6 @@ struct log_msg ...@@ -45,11 +45,6 @@ struct log_msg
mutable size_t color_range_start{0}; mutable size_t color_range_start{0};
mutable size_t color_range_end{0}; mutable size_t color_range_end{0};
operator fmt::string_view() const SPDLOG_NOEXCEPT
{
return payload;
}
const fmt::string_view payload; const fmt::string_view payload;
}; };
} // namespace details } // namespace details
......
...@@ -404,7 +404,7 @@ class v_formatter final : public flag_formatter ...@@ -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 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 ...@@ -530,7 +530,7 @@ class full_formatter final : public flag_formatter
dest.push_back(']'); dest.push_back(']');
dest.push_back(' '); dest.push_back(' ');
// fmt_helper::append_string_view(msg.msg(), dest); // fmt_helper::append_string_view(msg.msg(), dest);
fmt_helper::append_string_view(msg, dest); fmt_helper::append_string_view(msg.payload, dest);
} }
private: private:
......
...@@ -78,7 +78,7 @@ struct async_msg ...@@ -78,7 +78,7 @@ struct async_msg
, msg_id(m.msg_id) , msg_id(m.msg_id)
, worker_ptr(std::move(worker)) , 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) async_msg(async_logger_ptr &&worker, async_msg_type the_type)
......
...@@ -47,7 +47,7 @@ protected: ...@@ -47,7 +47,7 @@ protected:
fmt::memory_buffer formatted; fmt::memory_buffer formatted;
if (use_raw_msg_) if (use_raw_msg_)
{ {
details::fmt_helper::append_string_view(msg, formatted); details::fmt_helper::append_string_view(msg.payload, formatted);
} }
else else
{ {
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
protected: protected:
void sink_it_(const details::log_msg &msg) override void sink_it_(const details::log_msg &msg) override
{ {
::syslog(syslog_prio_from_level(msg), "%s", fmt::to_string(msg).c_str()); ::syslog(syslog_prio_from_level(msg), "%s", fmt::to_string(msg.payload).c_str());
} }
void flush_() override {} void flush_() override {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment