From f515799a53245faf3cd7d5e3e06b1d4c0a17f49f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 3 Jan 2023 20:07:58 -0800 Subject: [PATCH] use some if constexpr MSVC suggests this. Signed-off-by: Rosen Penev --- include/exiv2/value.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index f681cd82..5f39cce4 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -1271,7 +1271,7 @@ class ValueType : public Value { // Check for integer overflow. #if __cplusplus >= 201703L - if (std::is_signed_v == std::is_signed_v) { + if constexpr (std::is_signed_v == std::is_signed_v) { #else if (std::is_signed::value == std::is_signed::value) { #endif @@ -1282,7 +1282,7 @@ class ValueType : public Value { return 0; } #if __cplusplus >= 201703L - } else if (std::is_signed_v) { + } else if constexpr (std::is_signed_v) { #else } else if (std::is_signed::value) { #endif