diff options
author | Berkan Diler <b.diler@gmx.de> | 2022-02-17 21:38:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 21:38:50 +0100 |
commit | 9ca040c0ff66e8ad928b6fb109401a5b4b53a74d (patch) | |
tree | d8dd00bf459a2c894ff393c09afd60e96b57bcc4 /Ryujinx.Common/Utilities/BitUtils.cs | |
parent | 7e9011673b1593aa2b318e312e0b31379e2e57e4 (diff) |
Use ReadOnlySpan<byte> compiler optimization for static data (#3130)1.1.34
Diffstat (limited to 'Ryujinx.Common/Utilities/BitUtils.cs')
-rw-r--r-- | Ryujinx.Common/Utilities/BitUtils.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Common/Utilities/BitUtils.cs b/Ryujinx.Common/Utilities/BitUtils.cs index 4ce7da6b..180f1063 100644 --- a/Ryujinx.Common/Utilities/BitUtils.cs +++ b/Ryujinx.Common/Utilities/BitUtils.cs @@ -1,8 +1,10 @@ +using System; + namespace Ryujinx.Common { public static class BitUtils { - private static readonly byte[] ClzNibbleTbl = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; + private static ReadOnlySpan<byte> ClzNibbleTbl => new byte[] { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; public static uint AlignUp(uint value, int size) { |