From e43c495ce5a230fa81684899afc59b1c50da3cdb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 23 Mar 2017 10:59:40 -0400 Subject: [PATCH] BitField: Convert typedefs to using aliases --- Source/Core/Common/BitField.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 35d294d220..4d6a269e90 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -146,8 +146,11 @@ private: // T is an enumeration. Note that T is wrapped within an enable_if in the // former case to workaround compile errors which arise when using // std::underlying_type::type directly. - typedef typename std::conditional::value, std::underlying_type, - std::enable_if>::type::type StorageType; + using StorageType = typename std::conditional_t::value, std::underlying_type, + std::enable_if>::type; + + // Unsigned version of StorageType + using StorageTypeU = std::make_unsigned_t; constexpr T Value(std::true_type) const { @@ -160,9 +163,6 @@ private: return static_cast((storage & GetMask()) >> position); } - // Unsigned version of StorageType - typedef typename std::make_unsigned::type StorageTypeU; - static constexpr StorageType GetMask() { return (((StorageTypeU)~0) >> (8 * sizeof(T) - bits)) << position;