Merge pull request #4087 from Romain-Geissler-1A/remove-different-signedness-comparison-warning

Silence gcc -Wsign-compare warning when instantiating Poco::Dynamic::VarHolder::convertSignedToUnsigned.
This commit is contained in:
Günter Obiltschnig
2023-07-18 09:21:15 +02:00
committed by GitHub

View File

@@ -38,6 +38,7 @@
#include <list> #include <list>
#include <deque> #include <deque>
#include <typeinfo> #include <typeinfo>
#include <type_traits>
#undef min #undef min
#undef max #undef max
#include <limits> #include <limits>
@@ -360,7 +361,7 @@ protected:
if (from < 0) if (from < 0)
throw RangeException("Value too small."); throw RangeException("Value too small.");
checkUpperLimit<F,T>(from); checkUpperLimit<std::make_unsigned<F>,T>(from);
to = static_cast<T>(from); to = static_cast<T>(from);
} }