From 6cdc1c2f112ce17d88784ed9a8ff3fa2542d63fc Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 30 Oct 2021 17:46:06 +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 43b6ab475..fa20289b2 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(this->size() - elements_affected); + Container::resize(static_cast(this->size() - elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 6a155f9f4..244dfa15a 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(this->size() - elements_affected); + Container::resize(static_cast(this->size() - elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^