diff --git a/include/nlohmann/ordered_map.hpp b/include/nlohmann/ordered_map.hpp index fa20289b2..1f009643f 100644 --- a/include/nlohmann/ordered_map.hpp +++ b/include/nlohmann/ordered_map.hpp @@ -143,7 +143,7 @@ template , // first last // remove the unneeded elements at the end of the vector - Container::resize(static_cast(this->size() - elements_affected)); + Container::resize(this->size() - static_cast(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 244dfa15a..a3c42bf5d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -17530,7 +17530,7 @@ template , // first last // remove the unneeded elements at the end of the vector - Container::resize(static_cast(this->size() - elements_affected)); + Container::resize(this->size() - static_cast(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^