Fix -Wconversion warnings
This commit is contained in:
parent
c68703c9f4
commit
7e0a6ea77d
@ -1242,7 +1242,7 @@ template <typename Context> class basic_format_args {
|
|||||||
|
|
||||||
internal::type type(int index) const {
|
internal::type type(int index) const {
|
||||||
int shift = index * internal::packed_arg_bits;
|
int shift = index * internal::packed_arg_bits;
|
||||||
int mask = (1 << internal::packed_arg_bits) - 1;
|
unsigned int mask = (1 << internal::packed_arg_bits) - 1;
|
||||||
return static_cast<internal::type>((types_ >> shift) & mask);
|
return static_cast<internal::type>((types_ >> shift) & mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1572,7 +1572,7 @@ template <typename Range> class basic_writer {
|
|||||||
it = format_decimal<char_type>(
|
it = format_decimal<char_type>(
|
||||||
it, abs_value, size,
|
it, abs_value, size,
|
||||||
[this, s, &group, &digit_index](char_type*& buffer) {
|
[this, s, &group, &digit_index](char_type*& buffer) {
|
||||||
if (*group <= 0 || ++digit_index % *group != 0 ||
|
if (*group <= 0 || ++digit_index % static_cast<unsigned int>(*group) != 0 ||
|
||||||
*group == max_value<char>())
|
*group == max_value<char>())
|
||||||
return;
|
return;
|
||||||
if (group + 1 != groups.cend()) {
|
if (group + 1 != groups.cend()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user