mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 02:32:46 +01:00
Merge pull request #4305 from yuzu-emu/revert-4300-port-5441
Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp""
This commit is contained in:
commit
e5abf11186
1 changed files with 1 additions and 3 deletions
|
@ -11,9 +11,7 @@ namespace Common {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr T AlignUp(T value, std::size_t size) {
|
constexpr T AlignUp(T value, std::size_t size) {
|
||||||
static_assert(std::is_unsigned_v<T>, "T must be an unsigned value.");
|
static_assert(std::is_unsigned_v<T>, "T must be an unsigned value.");
|
||||||
auto mod{value % size};
|
return static_cast<T>(value + (size - value % size) % size);
|
||||||
value -= mod;
|
|
||||||
return static_cast<T>(mod == T{0} ? value : value + size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Reference in a new issue