diff options
| author | 2017-05-21 15:49:55 -0700 | |
|---|---|---|
| committer | 2017-05-24 21:06:00 -0700 | |
| commit | c1a9e940680874a7571f18d8767fe953996907b8 (patch) | |
| tree | 9f77aaf05de56eeabfbdbc153fa12fb68095fb69 /src/common/bit_field.h | |
| parent | Kernel: Centralize error definitions in errors.h (diff) | |
| download | yuzu-c1a9e940680874a7571f18d8767fe953996907b8.tar.gz yuzu-c1a9e940680874a7571f18d8767fe953996907b8.tar.xz yuzu-c1a9e940680874a7571f18d8767fe953996907b8.zip | |
Common: Clean up meta-template logic in BitField
Diffstat (limited to '')
| -rw-r--r-- | src/common/bit_field.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h index 72a01c7a8..0cc0a1be0 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h | |||
| @@ -121,11 +121,11 @@ private: | |||
| 121 | // T is an enumeration. Note that T is wrapped within an enable_if in the | 121 | // T is an enumeration. Note that T is wrapped within an enable_if in the |
| 122 | // former case to workaround compile errors which arise when using | 122 | // former case to workaround compile errors which arise when using |
| 123 | // std::underlying_type<T>::type directly. | 123 | // std::underlying_type<T>::type directly. |
| 124 | typedef typename std::conditional<std::is_enum<T>::value, std::underlying_type<T>, | 124 | using StorageType = typename std::conditional_t<std::is_enum<T>::value, std::underlying_type<T>, |
| 125 | std::enable_if<true, T>>::type::type StorageType; | 125 | std::enable_if<true, T>>::type; |
| 126 | 126 | ||
| 127 | // Unsigned version of StorageType | 127 | // Unsigned version of StorageType |
| 128 | typedef typename std::make_unsigned<StorageType>::type StorageTypeU; | 128 | using StorageTypeU = std::make_unsigned_t<StorageType>; |
| 129 | 129 | ||
| 130 | public: | 130 | public: |
| 131 | /// Constants to allow limited introspection of fields if needed | 131 | /// Constants to allow limited introspection of fields if needed |