Handle MSVC warning treated as error

This commit is contained in:
Jeremy 2024-03-31 16:37:29 -05:00
parent c1b7be9f83
commit 40696e8d02
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E

View File

@ -84,7 +84,7 @@ namespace microfmt {
// log_2(x) == 63 - clz(x)
// 1 + (63 - clz(value)) / (63 - clz(1 << shift))
// 63 - clz(1 << shift) is the same as shift
auto n_digits = 1 + (63 - clz(value)) / shift;
auto n_digits = static_cast<std::size_t>(1 + (63 - clz(value)) / shift);
std::string number;
number.resize(n_digits);
std::size_t i = n_digits - 1;