Skip to content

Commit

Permalink
Make android happy
Browse files Browse the repository at this point in the history
  • Loading branch information
andreilitvin committed Oct 22, 2024
1 parent d6073eb commit 8c91bb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/util/odd-sized-integers.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ inline constexpr int64_t MaxSignedValue(unsigned ByteSize)
{
return std::numeric_limits<int64_t>::max();
}
return (1LL << (8 * ByteSize - 1)) - 1;
return (static_cast<int64_t>(1) << (8 * ByteSize - 1)) - 1;
}

inline constexpr int64_t MinSignedValue(unsigned ByteSize)
Expand All @@ -132,7 +132,7 @@ inline constexpr int64_t MinSignedValue(unsigned ByteSize)
{
return std::numeric_limits<int64_t>::min();
}
return -(1LL << (8 * ByteSize - 1));
return -(static_cast<int32_t>(1) << (8 * ByteSize - 1));
}

/// Readability-method to express that the maximum signed value is a null value
Expand Down

0 comments on commit 8c91bb0

Please sign in to comment.