Skip to content

Commit

Permalink
use _v
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb authored and piponazo committed May 2, 2022
1 parent 0dcd860 commit 19dc566
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/exiv2/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,14 +1268,14 @@ class ValueType : public Value {
}

// Check for integer overflow.
if (std::is_signed<I>::value == std::is_signed<decltype(a)>::value) {
if (std::is_signed_v<I> == std::is_signed_v<decltype(a)>) {
// conversion does not change sign
const auto imin = std::numeric_limits<I>::min();
const auto imax = std::numeric_limits<I>::max();
if (imax < b || a < imin || imax < a) {
return 0;
}
} else if (std::is_signed<I>::value) {
} else if (std::is_signed_v<I>) {
// conversion is from unsigned to signed
const auto imax = std::make_unsigned_t<I>(std::numeric_limits<I>::max());
if (imax < b || imax < a) {
Expand Down

0 comments on commit 19dc566

Please sign in to comment.