From e87de698f31ad3f902238dbcfa122cc56aee7c16 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 1 Jan 2023 13:38:14 -0800 Subject: [PATCH] static_cast make_unsigned Signed-off-by: Rosen Penev --- include/exiv2/value.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index 2b2c53b4..f681cd82 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -1288,9 +1288,9 @@ class ValueType : public Value { #endif // conversion is from unsigned to signed #if __cplusplus >= 201402L - const auto imax = std::make_unsigned_t(std::numeric_limits::max()); + const auto imax = static_cast>(std::numeric_limits::max()); #else - const auto imax = typename std::make_unsigned::type(std::numeric_limits::max()); + const auto imax = static_cast::type>(std::numeric_limits::max()); #endif if (imax < b || imax < a) { return 0; @@ -1303,11 +1303,11 @@ class ValueType : public Value { } // Inputs are not negative so convert them to unsigned. #if __cplusplus >= 201402L - const auto a_u = std::make_unsigned_t(a); - const auto b_u = std::make_unsigned_t(b); + const auto a_u = static_cast>(a); + const auto b_u = static_cast>(b); #else - const auto a_u = typename std::make_unsigned::type(a); - const auto b_u = typename std::make_unsigned::type(b); + const auto a_u = static_cast::type>(a); + const auto b_u = static_cast::type>(b); #endif if (imax < b_u || imax < a_u) { return 0;