From 50eee9b2185c59c32fb82cf464230a058edd10ea Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 12 Aug 2023 15:18:55 -0400 Subject: fssystem: rework for yuzu style --- src/common/alignment.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/common/alignment.h') diff --git a/src/common/alignment.h b/src/common/alignment.h index 0057052af..fc5c26898 100644 --- a/src/common/alignment.h +++ b/src/common/alignment.h @@ -12,7 +12,9 @@ namespace Common { template requires std::is_integral_v -[[nodiscard]] constexpr T AlignUp(T value, size_t size) { +[[nodiscard]] constexpr T AlignUp(T value_, size_t size) { + using U = typename std::make_unsigned_t; + auto value{static_cast(value_)}; auto mod{static_cast(value % size)}; value -= mod; return static_cast(mod == T{0} ? value : value + size); @@ -26,7 +28,9 @@ template template requires std::is_integral_v -[[nodiscard]] constexpr T AlignDown(T value, size_t size) { +[[nodiscard]] constexpr T AlignDown(T value_, size_t size) { + using U = typename std::make_unsigned_t; + const auto value{static_cast(value_)}; return static_cast(value - value % size); } -- cgit v1.2.3