diff --git a/Assets/YooAsset/Runtime/Utility/BitMask32.cs b/Assets/YooAsset/Runtime/Utility/BitMask32.cs deleted file mode 100644 index 4e53740..0000000 --- a/Assets/YooAsset/Runtime/Utility/BitMask32.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; - -namespace YooAsset -{ - internal struct BitMask32 - { - private int _mask; - - public static implicit operator int(BitMask32 mask) { return mask._mask; } - public static implicit operator BitMask32(int mask) { return new BitMask32(mask); } - - public BitMask32(int mask) - { - _mask = mask; - } - - /// - /// 打开位 - /// - public void Open(int bit) - { - if (bit < 0 || bit > 31) - throw new ArgumentOutOfRangeException(); - else - _mask |= 1 << bit; - } - - /// - /// 关闭位 - /// - public void Close(int bit) - { - if (bit < 0 || bit > 31) - throw new ArgumentOutOfRangeException(); - else - _mask &= ~(1 << bit); - } - - /// - /// 位取反 - /// - public void Reverse(int bit) - { - if (bit < 0 || bit > 31) - throw new ArgumentOutOfRangeException(); - else - _mask ^= 1 << bit; - } - - /// - /// 所有位取反 - /// - public void Inverse() - { - _mask = ~_mask; - } - - /// - /// 比对位值 - /// - public bool Test(int bit) - { - if (bit < 0 || bit > 31) - throw new ArgumentOutOfRangeException(); - else - return (_mask & (1 << bit)) != 0; - } - } -} \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/Utility/BitMask32.cs.meta b/Assets/YooAsset/Runtime/Utility/BitMask32.cs.meta deleted file mode 100644 index 18d1885..0000000 --- a/Assets/YooAsset/Runtime/Utility/BitMask32.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 60c7594328ef976408edadfdf2b9aa3d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/YooAsset/Runtime/Utility/BitMask64.cs b/Assets/YooAsset/Runtime/Utility/BitMask64.cs deleted file mode 100644 index 8bfa729..0000000 --- a/Assets/YooAsset/Runtime/Utility/BitMask64.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; - -namespace YooAsset -{ - internal struct BitMask64 - { - private long _mask; - - public static implicit operator long(BitMask64 mask) { return mask._mask; } - public static implicit operator BitMask64(long mask) { return new BitMask64(mask); } - - public BitMask64(long mask) - { - _mask = mask; - } - - /// - /// 打开位 - /// - public void Open(int bit) - { - if (bit < 0 || bit > 63) - throw new ArgumentOutOfRangeException(); - else - _mask |= 1L << bit; - } - - /// - /// 关闭位 - /// - public void Close(int bit) - { - if (bit < 0 || bit > 63) - throw new ArgumentOutOfRangeException(); - else - _mask &= ~(1L << bit); - } - - /// - /// 位取反 - /// - public void Reverse(int bit) - { - if (bit < 0 || bit > 63) - throw new ArgumentOutOfRangeException(); - else - _mask ^= 1L << bit; - } - - /// - /// 所有位取反 - /// - public void Inverse() - { - _mask = ~_mask; - } - - /// - /// 比对位值 - /// - public bool Test(int bit) - { - if (bit < 0 || bit > 63) - throw new ArgumentOutOfRangeException(); - else - return (_mask & (1L << bit)) != 0; - } - } -} \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/Utility/BitMask64.cs.meta b/Assets/YooAsset/Runtime/Utility/BitMask64.cs.meta deleted file mode 100644 index 5d62c53..0000000 --- a/Assets/YooAsset/Runtime/Utility/BitMask64.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6b03684bc5163694ab3983243512b4cc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: