From 416afa065ce635d1fc9618542b02dd8f24a5f42b Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 27 Jun 2017 18:14:04 +1000 Subject: [PATCH] BitField: Add StartBit() and NumBits() accessors --- Source/Core/Common/BitField.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 85a595239c..59bee7b4b5 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -141,6 +141,8 @@ public: constexpr T Value() const { return Value(std::is_signed()); } constexpr operator T() const { return Value(); } + constexpr std::size_t StartBit() const { return position; } + constexpr std::size_t NumBits() const { return bits; } private: // StorageType is T for non-enum types and the underlying type of T if // T is an enumeration. Note that T is wrapped within an enable_if in the