From d6420b8803ae4fec21725f2b4141b172702fc961 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 22 Nov 2021 14:49:30 +0300 Subject: [PATCH] Put std::hash specialization out of std --- .../Emu/RSX/Common/texture_cache_predictor.h | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h index 287a2debca..b3b00c85b9 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h @@ -396,17 +396,14 @@ namespace rsx }; } // namespace rsx -namespace std +template +struct std::hash> { - template - struct hash> + usz operator()(const rsx::texture_cache_predictor_key& k) const { - usz operator()(const rsx::texture_cache_predictor_key& k) const - { - usz result = std::hash{}(k.cpu_range); - result ^= static_cast(k.format); - result ^= (static_cast(k.context) << 16); - return result; - } - }; -} // namespace std + usz result = std::hash{}(k.cpu_range); + result ^= static_cast(k.format); + result ^= (static_cast(k.context) << 16); + return result; + } +};