mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-13 01:10:26 +08:00
Fixed cast warning
This commit is contained in:
parent
0e49bfff51
commit
c23430b438
@ -65,7 +65,7 @@ protected:
|
|||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..", static_cast<unsigned>(skip_counter_));
|
auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..", static_cast<unsigned>(skip_counter_));
|
||||||
if (msg_size > 0 && msg_size < sizeof(buf))
|
if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf))
|
||||||
{
|
{
|
||||||
details::log_msg skipped_msg{msg.logger_name, level::info, string_view_t{buf, static_cast<size_t>(msg_size)}};
|
details::log_msg skipped_msg{msg.logger_name, level::info, string_view_t{buf, static_cast<size_t>(msg_size)}};
|
||||||
dist_sink<Mutex>::sink_it_(skipped_msg);
|
dist_sink<Mutex>::sink_it_(skipped_msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user