From 0dfefacdf45e4662043a3ea39d5c0e612329393b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 31 Jan 2024 12:42:57 -0500 Subject: [PATCH] VertexLoaderBase: Collapse std namespace for hash and mark noexcept Makes the hash specialization a little less noisy. Also we mark it noexcept, since hashes shouldn't be throwing exceptions (and this can be optimized on). --- Source/Core/VideoCommon/VertexLoaderBase.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoaderBase.h b/Source/Core/VideoCommon/VertexLoaderBase.h index 26d6f3ff2e..451f035793 100644 --- a/Source/Core/VideoCommon/VertexLoaderBase.h +++ b/Source/Core/VideoCommon/VertexLoaderBase.h @@ -46,14 +46,11 @@ private: } }; -namespace std -{ template <> -struct hash +struct std::hash { - size_t operator()(const VertexLoaderUID& uid) const { return uid.GetHash(); } + size_t operator()(const VertexLoaderUID& uid) const noexcept { return uid.GetHash(); } }; -} // namespace std class VertexLoaderBase {