mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-09-21 03:41:42 +02:00
BitField: Add StartBit() and NumBits() accessors
This commit is contained in:
parent
3e508fc0a2
commit
416afa065c
1 changed files with 2 additions and 0 deletions
|
@ -141,6 +141,8 @@ public:
|
||||||
|
|
||||||
constexpr T Value() const { return Value(std::is_signed<T>()); }
|
constexpr T Value() const { return Value(std::is_signed<T>()); }
|
||||||
constexpr operator T() const { return Value(); }
|
constexpr operator T() const { return Value(); }
|
||||||
|
constexpr std::size_t StartBit() const { return position; }
|
||||||
|
constexpr std::size_t NumBits() const { return bits; }
|
||||||
private:
|
private:
|
||||||
// StorageType is T for non-enum types and the underlying type of T if
|
// 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
|
// T is an enumeration. Note that T is wrapped within an enable_if in the
|
||||||
|
|
Loading…
Reference in a new issue