diff --git a/Utilities/hash.h b/Utilities/hash.h index 58b2fd3c8c..6f42c30f50 100644 --- a/Utilities/hash.h +++ b/Utilities/hash.h @@ -28,20 +28,19 @@ namespace rpcs3 template static size_t hash_struct(const T& value) { - // TODO: use c++17 if constexpr static constexpr auto block_sz = sizeof(T); - if ((block_sz & 0x7) == 0) + if constexpr ((block_sz & 0x7) == 0) { return hash_struct_base(value); } - if ((block_sz & 0x3) == 0) + if constexpr ((block_sz & 0x3) == 0) { return hash_struct_base(value); } - if ((block_sz & 0x1) == 0) + if constexpr ((block_sz & 0x1) == 0) { return hash_struct_base(value); }