From ac07dac1782544b61e44b9fe1d5f0fffd356aa15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Sun, 4 Dec 2022 17:10:09 -0300 Subject: [PATCH 01/51] Add casts to F32 Map/MapIterator functions to get rid of double to float conversion warnings --- src/common/scripting/core/maps.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/common/scripting/core/maps.cpp b/src/common/scripting/core/maps.cpp index bb7cd369b..28fda643e 100644 --- a/src/common/scripting/core/maps.cpp +++ b/src/common/scripting/core/maps.cpp @@ -162,7 +162,15 @@ template void MapInsert(M * self, expand_types_vmInsert(key, value); + + if constexpr(std::is_same_v) + { + self->Insert(key,static_cast(value)); + } + else + { + self->Insert(key, value); + } self->info->rev++; // invalidate iterators } @@ -246,7 +254,15 @@ template void MapIteratorSetValue(I * self, expand_types_vm) + { + val = static_cast(value); + } + else + { + val = value; + } } -- 2.39.3