From 19d18662ea3ed5470898ed2b7bbb06d45f6004dd Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 13 Dec 2020 04:30:27 -0300 Subject: Correct type of executable sizes (#1802) --- Ryujinx.Common/Utilities/BitUtils.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Ryujinx.Common/Utilities/BitUtils.cs') diff --git a/Ryujinx.Common/Utilities/BitUtils.cs b/Ryujinx.Common/Utilities/BitUtils.cs index 5f70f742..4ce7da6b 100644 --- a/Ryujinx.Common/Utilities/BitUtils.cs +++ b/Ryujinx.Common/Utilities/BitUtils.cs @@ -4,6 +4,11 @@ namespace Ryujinx.Common { private static readonly byte[] ClzNibbleTbl = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; + public static uint AlignUp(uint value, int size) + { + return (uint)AlignUp((int)value, size); + } + public static int AlignUp(int value, int size) { return (value + (size - 1)) & -size; @@ -19,6 +24,11 @@ namespace Ryujinx.Common return (value + (size - 1)) & -(long)size; } + public static uint AlignDown(uint value, int size) + { + return (uint)AlignDown((int)value, size); + } + public static int AlignDown(int value, int size) { return value & -size; -- cgit v1.2.3