mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
Fixed conversion warnings
This commit is contained in:
parent
2ac42c0d14
commit
452ba76507
@ -47,7 +47,7 @@ template<typename T>
|
|||||||
inline unsigned count_digits(T n)
|
inline unsigned count_digits(T n)
|
||||||
{
|
{
|
||||||
using count_type = typename std::conditional<(sizeof(T) > sizeof(uint32_t)), uint64_t, uint32_t>::type;
|
using count_type = typename std::conditional<(sizeof(T) > sizeof(uint32_t)), uint64_t, uint32_t>::type;
|
||||||
return fmt::internal::count_digits(static_cast<count_type>(n));
|
return static_cast<unsigned>(fmt::internal::count_digits(static_cast<count_type>(n)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<size_t Buffer_Size>
|
template<size_t Buffer_Size>
|
||||||
|
@ -712,7 +712,7 @@ public:
|
|||||||
const auto pid = static_cast<uint32_t>(details::os::pid());
|
const auto pid = static_cast<uint32_t>(details::os::pid());
|
||||||
if (padinfo_.enabled())
|
if (padinfo_.enabled())
|
||||||
{
|
{
|
||||||
const size_t field_size = fmt::internal::count_digits(pid);
|
auto field_size = fmt_helper::count_digits(pid);
|
||||||
scoped_pad p(field_size, padinfo_, dest);
|
scoped_pad p(field_size, padinfo_, dest);
|
||||||
fmt_helper::append_int(pid, dest);
|
fmt_helper::append_int(pid, dest);
|
||||||
}
|
}
|
||||||
@ -885,7 +885,7 @@ public:
|
|||||||
}
|
}
|
||||||
if (padinfo_.enabled())
|
if (padinfo_.enabled())
|
||||||
{
|
{
|
||||||
const size_t field_size = fmt::internal::count_digits(msg.source.line);
|
auto field_size = fmt_helper::count_digits(msg.source.line);
|
||||||
scoped_pad p(field_size, padinfo_, dest);
|
scoped_pad p(field_size, padinfo_, dest);
|
||||||
fmt_helper::append_int(msg.source.line, dest);
|
fmt_helper::append_int(msg.source.line, dest);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user