mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-27 03:39:57 +00:00
BitField: Add an explicit getter function for retrieving the BitField value.
Sometimes (in particular when using non-typesafe functions) it can be convenient to have a getter method rather than performing a potentially lengthy explicit cast.
This commit is contained in:
parent
78fbf2ecaa
commit
3d6f9ef897
@ -147,7 +147,7 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline operator T() const
|
__forceinline T Value() const
|
||||||
{
|
{
|
||||||
if (std::numeric_limits<T>::is_signed)
|
if (std::numeric_limits<T>::is_signed)
|
||||||
{
|
{
|
||||||
@ -160,6 +160,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__forceinline operator T() const
|
||||||
|
{
|
||||||
|
return Value();
|
||||||
|
}
|
||||||
|
|
||||||
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…
x
Reference in New Issue
Block a user