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;
|
||||
}
|
||||
|
||||
__forceinline operator T() const
|
||||
__forceinline T Value() const
|
||||
{
|
||||
if (std::numeric_limits<T>::is_signed)
|
||||
{
|
||||
|
@ -160,6 +160,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
__forceinline operator T() const
|
||||
{
|
||||
return Value();
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue