Commit 45da432d authored by Jan Schwers's avatar Jan Schwers Committed by Victor Zverovich

fix compiler warnings in public header files

parent d55e61f1
...@@ -1611,7 +1611,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer { ...@@ -1611,7 +1611,7 @@ template <typename OutputIt, typename Char, typename UInt> struct int_writer {
char digits[40]; char digits[40];
format_decimal(digits, abs_value, num_digits); format_decimal(digits, abs_value, num_digits);
basic_memory_buffer<Char> buffer; basic_memory_buffer<Char> buffer;
size += prefix_size; size += static_cast<int>(prefix_size);
const auto usize = to_unsigned(size); const auto usize = to_unsigned(size);
buffer.resize(usize); buffer.resize(usize);
basic_string_view<Char> s(&sep, sep_size); basic_string_view<Char> s(&sep, sep_size);
...@@ -3495,7 +3495,7 @@ inline std::string to_string(T value) { ...@@ -3495,7 +3495,7 @@ inline std::string to_string(T value) {
// The buffer should be large enough to store the number including the sign or // The buffer should be large enough to store the number including the sign or
// "false" for bool. // "false" for bool.
constexpr int max_size = detail::digits10<T>() + 2; constexpr int max_size = detail::digits10<T>() + 2;
char buffer[max_size > 5 ? max_size : 5]; char buffer[max_size > 5 ? static_cast<unsigned>(max_size) : 5];
char* begin = buffer; char* begin = buffer;
return std::string(begin, detail::write<char>(begin, value)); return std::string(begin, detail::write<char>(begin, value));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment