mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Fixed gcc9 conversion warning
This commit is contained in:
parent
4b0267910c
commit
9fbf82b603
@ -61,9 +61,9 @@ protected:
|
|||||||
|
|
||||||
size_t length = payload.size();
|
size_t length = payload.size();
|
||||||
// limit to max int
|
// limit to max int
|
||||||
if (length > std::numeric_limits<int>::max())
|
if (length > static_cast<size_t>(std::numeric_limits<int>::max()))
|
||||||
{
|
{
|
||||||
length = std::numeric_limits<int>::max();
|
length = static_cast<size_t>(std::numeric_limits<int>::max());
|
||||||
}
|
}
|
||||||
|
|
||||||
::syslog(syslog_prio_from_level(msg), "%.*s", static_cast<int>(length), payload.data());
|
::syslog(syslog_prio_from_level(msg), "%.*s", static_cast<int>(length), payload.data());
|
||||||
|
Loading…
Reference in New Issue
Block a user