mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
Removed redundant casts to string_view
This commit is contained in:
parent
0d0706a204
commit
e35414a0f1
@ -96,7 +96,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const T &msg)
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
details::log_msg log_msg(&name_, lvl, static_cast<spdlog::string_view_t>(msg));
|
details::log_msg log_msg(&name_, lvl, msg);
|
||||||
sink_it_(log_msg);
|
sink_it_(log_msg);
|
||||||
}
|
}
|
||||||
SPDLOG_CATCH_AND_HANDLE
|
SPDLOG_CATCH_AND_HANDLE
|
||||||
|
@ -38,7 +38,7 @@ class name_formatter : 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(string_view_t(*msg.logger_name), dest);
|
fmt_helper::append_string_view(*msg.logger_name, dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user