BitField: Get rid of a C-style cast
This can simply be the max value of the unsigned type.
This commit is contained in:
parent
e43c495ce5
commit
b711daee5f
|
@ -165,7 +165,7 @@ private:
|
||||||
|
|
||||||
static constexpr StorageType GetMask()
|
static constexpr StorageType GetMask()
|
||||||
{
|
{
|
||||||
return (((StorageTypeU)~0) >> (8 * sizeof(T) - bits)) << position;
|
return (std::numeric_limits<StorageTypeU>::max() >> (8 * sizeof(T) - bits)) << position;
|
||||||
}
|
}
|
||||||
|
|
||||||
StorageType storage;
|
StorageType storage;
|
||||||
|
|
Loading…
Reference in New Issue