From 45e18dc54236920db11b7914a4834a94cbed232b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 30 Oct 2021 18:32:41 +0200 Subject: [PATCH] :rotating_light: fix Wsign-conversion warning --- include/nlohmann/ordered_map.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ] // ^ ^