diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h index c814a7b85b..221460006f 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h @@ -66,27 +66,27 @@ namespace OpenRCT2::Ui return _instances.at(idx); } - typename std::vector::iterator begin() // NOLINT(readability-identifier-naming) + std::vector::iterator begin() // NOLINT(readability-identifier-naming) { return _instances.begin(); } - typename std::vector::const_iterator begin() const // NOLINT(readability-identifier-naming) + std::vector::const_iterator begin() const // NOLINT(readability-identifier-naming) { return _instances.cbegin(); } - typename std::vector::const_iterator cbegin() const // NOLINT(readability-identifier-naming) + std::vector::const_iterator cbegin() const // NOLINT(readability-identifier-naming) { return _instances.cbegin(); } - typename std::vector::iterator end() // NOLINT(readability-identifier-naming) + std::vector::iterator end() // NOLINT(readability-identifier-naming) { return _instances.begin() + _numInstances; } - typename std::vector::const_iterator end() const // NOLINT(readability-identifier-naming) + std::vector::const_iterator end() const // NOLINT(readability-identifier-naming) { return _instances.cbegin() + _numInstances; } - typename std::vector::const_iterator cend() const // NOLINT(readability-identifier-naming) + std::vector::const_iterator cend() const // NOLINT(readability-identifier-naming) { return _instances.cbegin() + _numInstances; } diff --git a/src/openrct2/core/BackgroundWorker.hpp b/src/openrct2/core/BackgroundWorker.hpp index 333dab2466..708ea519a8 100644 --- a/src/openrct2/core/BackgroundWorker.hpp +++ b/src/openrct2/core/BackgroundWorker.hpp @@ -214,7 +214,7 @@ namespace OpenRCT2 "Work function must be callable with or without stop_token"); constexpr bool expectsToken = std::is_invocable_v; - using Result = typename Detail::ResultType>::type; + using Result = Detail::ResultType>::type; const auto wrappedFunc = [wf = std::forward(work)](std::atomic_bool& token) { if constexpr (std::is_invocable_v) diff --git a/src/openrct2/core/BitSet.hpp b/src/openrct2/core/BitSet.hpp index c39c7eec27..c586b5bea2 100644 --- a/src/openrct2/core/BitSet.hpp +++ b/src/openrct2/core/BitSet.hpp @@ -135,7 +135,7 @@ namespace OpenRCT2 template struct storage_block_type_aligned { - using value_type = typename StorageBlockType()>::value_type; + using value_type = StorageBlockType()>::value_type; }; } // namespace Detail::BitSet @@ -144,7 +144,7 @@ namespace OpenRCT2 { static constexpr size_t kByteAlignedBitSize = Detail::BitSet::ByteAlignBits(); - using StorageBlockType = typename Detail::BitSet::storage_block_type_aligned::value_type; + using StorageBlockType = Detail::BitSet::storage_block_type_aligned::value_type; static constexpr size_t kBlockByteSize = sizeof(StorageBlockType); static constexpr size_t kBlockBitSize = kBlockByteSize * Detail::BitSet::kBitsPerByte; diff --git a/src/openrct2/core/Crypt.CNG.cpp b/src/openrct2/core/Crypt.CNG.cpp index 7a89208988..44b06bc055 100644 --- a/src/openrct2/core/Crypt.CNG.cpp +++ b/src/openrct2/core/Crypt.CNG.cpp @@ -103,7 +103,7 @@ public: return this; } - typename TBase::Result Finish() override + TBase::Result Finish() override { typename TBase::Result result; auto status = BCryptFinishHash(_hHash, result.data(), static_cast(result.size()), 0); diff --git a/src/openrct2/core/Endianness.h b/src/openrct2/core/Endianness.h index b0683738ab..89daa906fd 100644 --- a/src/openrct2/core/Endianness.h +++ b/src/openrct2/core/Endianness.h @@ -66,7 +66,7 @@ template static T ByteSwapBE(const T& value) { using ByteSwap = ByteSwapT; - using UIntType = typename ByteSwap::UIntType; + using UIntType = ByteSwap::UIntType; if constexpr (std::is_enum_v || std::is_integral_v) { diff --git a/src/openrct2/core/Numerics.hpp b/src/openrct2/core/Numerics.hpp index 3be6171b62..3df4ea57ac 100644 --- a/src/openrct2/core/Numerics.hpp +++ b/src/openrct2/core/Numerics.hpp @@ -94,7 +94,7 @@ namespace OpenRCT2::Numerics static constexpr _UIntType rol(_UIntType x, size_t shift) { static_assert(std::is_unsigned<_UIntType>::value, "result_type must be an unsigned integral type"); - using limits = typename std::numeric_limits<_UIntType>; + using limits = std::numeric_limits<_UIntType>; return ((static_cast<_UIntType>(x) << shift) | (static_cast<_UIntType>(x) >> (limits::digits - shift))); } diff --git a/src/openrct2/core/OrcaStream.hpp b/src/openrct2/core/OrcaStream.hpp index 093f27fbc7..323d5b1210 100644 --- a/src/openrct2/core/OrcaStream.hpp +++ b/src/openrct2/core/OrcaStream.hpp @@ -346,7 +346,7 @@ namespace OpenRCT2 template::value, bool> = true> void readWrite(T& v) { - using underlying = typename std::underlying_type::type; + using underlying = std::underlying_type::type; if (_mode == Mode::reading) { v = static_cast(readInteger()); diff --git a/src/openrct2/core/Random.hpp b/src/openrct2/core/Random.hpp index 3ac484af6c..c1956e36fd 100644 --- a/src/openrct2/core/Random.hpp +++ b/src/openrct2/core/Random.hpp @@ -135,7 +135,7 @@ namespace OpenRCT2::Random s1 = r.s1; } - template::value>::type> + template::value>::type> explicit RotateEngine(TSseq& seed_seq) { seed(seed_seq); @@ -148,7 +148,7 @@ namespace OpenRCT2::Random } template - typename std::enable_if::value, void>::type seed(TSseq& seed_seq) + std::enable_if::value, void>::type seed(TSseq& seed_seq) { std::array s; seed_seq.generate(s.begin(), s.end()); diff --git a/src/openrct2/localisation/Formatter.h b/src/openrct2/localisation/Formatter.h index 023f88ce92..841685a59b 100644 --- a/src/openrct2/localisation/Formatter.h +++ b/src/openrct2/localisation/Formatter.h @@ -89,18 +89,18 @@ namespace OpenRCT2 // clang-format off static_assert( - std::is_same_v, char*> || - std::is_same_v, const char*> || - std::is_same_v, int16_t> || - std::is_same_v, int32_t> || - std::is_same_v, money64> || - std::is_same_v, RideId> || - std::is_same_v, EntityId> || - std::is_same_v, StringId> || - std::is_same_v, uint16_t> || - std::is_same_v, uint32_t> || - std::is_same_v, utf8*> || - std::is_same_v, const utf8*> + std::is_same_v, char*> || + std::is_same_v, const char*> || + std::is_same_v, int16_t> || + std::is_same_v, int32_t> || + std::is_same_v, money64> || + std::is_same_v, RideId> || + std::is_same_v, EntityId> || + std::is_same_v, StringId> || + std::is_same_v, uint16_t> || + std::is_same_v, uint32_t> || + std::is_same_v, utf8*> || + std::is_same_v, const utf8*> ); // clang-format on diff --git a/src/openrct2/management/NewsItem.h b/src/openrct2/management/NewsItem.h index 07ec6cd8bf..e4c9e81868 100644 --- a/src/openrct2/management/NewsItem.h +++ b/src/openrct2/management/NewsItem.h @@ -132,13 +132,13 @@ namespace OpenRCT2::News public: static_assert(N > 0, "Cannot instantiate News::ItemQueue with size=0"); - using value_type = typename std::array::value_type; + using value_type = std::array::value_type; using pointer = value_type*; using const_pointer = const value_type*; using reference = value_type&; using const_reference = const value_type&; - using iterator = typename std::array::iterator; - using const_iterator = typename std::array::const_iterator; + using iterator = std::array::iterator; + using const_iterator = std::array::const_iterator; using size_type = std::size_t; using difference_type = std::ptrdiff_t; using reverse_iterator = std::reverse_iterator; diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index 5d7a680511..b4820c1391 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -358,7 +358,7 @@ private: // Taken from http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon template - static typename std::enable_if::is_integer, bool>::type AlmostEqual(T x, T y, int32_t ulp = 20) + static std::enable_if::is_integer, bool>::type AlmostEqual(T x, T y, int32_t ulp = 20) { // the machine epsilon has to be scaled to the magnitude of the values used // and multiplied by the desired precision in ULPs (units in the last place)