From b711daee5ff18479b11657262a338f3c431d0ef0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 23 Mar 2017 11:01:39 -0400 Subject: [PATCH] BitField: Get rid of a C-style cast This can simply be the max value of the unsigned type. --- Source/Core/Common/BitField.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 4d6a269e90..85a595239c 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -165,7 +165,7 @@ private: static constexpr StorageType GetMask() { - return (((StorageTypeU)~0) >> (8 * sizeof(T) - bits)) << position; + return (std::numeric_limits::max() >> (8 * sizeof(T) - bits)) << position; } StorageType storage;