Unverified Commit 0245ae51 authored by Niels Lohmann's avatar Niels Lohmann Committed by GitHub

Merge pull request #1797 from t-b/fix-integer-truncation

iteration_proxy: Fix integer truncation from std::size_t to int
parents 4c061918 35b47c27
...@@ -13,7 +13,7 @@ namespace nlohmann ...@@ -13,7 +13,7 @@ namespace nlohmann
namespace detail namespace detail
{ {
template<typename string_type> template<typename string_type>
void int_to_string( string_type& target, int value ) void int_to_string( string_type& target, std::size_t value )
{ {
target = std::to_string(value); target = std::to_string(value);
} }
......
...@@ -3277,7 +3277,7 @@ namespace nlohmann ...@@ -3277,7 +3277,7 @@ namespace nlohmann
namespace detail namespace detail
{ {
template<typename string_type> template<typename string_type>
void int_to_string( string_type& target, int value ) void int_to_string( string_type& target, std::size_t value )
{ {
target = std::to_string(value); target = std::to_string(value);
} }
......
...@@ -154,7 +154,7 @@ class alt_string ...@@ -154,7 +154,7 @@ class alt_string
friend bool ::operator<(const char*, const alt_string&); friend bool ::operator<(const char*, const alt_string&);
}; };
void int_to_string( alt_string& target, int value ) void int_to_string( alt_string& target, std::size_t value )
{ {
target = std::to_string(value).c_str(); target = std::to_string(value).c_str();
} }
......
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