diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-08-26 13:58:45 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-11-17 20:04:33 -0800 |
| commit | d2041b4c2a8562073ab905e2aea3b05c678aa962 (patch) | |
| tree | ceaf1bbc79e519a3b45dd24172d3aeda08eea218 /Source/Core/Common | |
| parent | 555a93057c07f045cc71c4652c54eebb990021b7 (diff) | |
VideoCommon: Add signed version of BitfieldExtract
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/BitField.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 26b3c5e0a4..2f5eba092f 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -149,6 +149,7 @@ public: constexpr T Value() const { return Value(std::is_signed<T>()); } constexpr operator T() const { return Value(); } + static constexpr bool IsSigned() { return std::is_signed<T>(); } static constexpr std::size_t StartBit() { return position; } static constexpr std::size_t NumBits() { return bits; } @@ -244,6 +245,7 @@ public: BitFieldArray& operator=(const BitFieldArray&) = delete; public: + constexpr bool IsSigned() const { return std::is_signed<T>(); } constexpr std::size_t StartBit() const { return position; } constexpr std::size_t NumBits() const { return bits; } constexpr std::size_t Size() const { return size; } |
