From 79a5716110b8c900e726e58b3b9ba12e5fd34c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Tue, 15 Mar 2022 09:02:30 +0100 Subject: [PATCH] Revert "Try to fix GCC error" This reverts commit 11d5eb7d6063e6cf1da276cc5981d2d57e13f05e. --- include/Nazara/Core/Algorithm.hpp | 2 +- include/Nazara/Core/Algorithm.inl | 2 +- src/Nazara/Shader/LangWriter.cpp | 2 +- src/Nazara/Shader/SpirvAstVisitor.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Nazara/Core/Algorithm.hpp b/include/Nazara/Core/Algorithm.hpp index 827850c86..710952bd4 100644 --- a/include/Nazara/Core/Algorithm.hpp +++ b/include/Nazara/Core/Algorithm.hpp @@ -40,7 +40,7 @@ namespace Nz template void HashCombine(std::size_t& seed, const T& v); template bool IsPowerOfTwo(T value); template V& Retrieve(std::unordered_map& map, const K& key); - template const V& RetrieveConst(const std::unordered_map& map, const K& key); + template const V& Retrieve(const std::unordered_map& map, const K& key); template T ReverseBits(T integer); template To SafeCast(From&& value); templatestd::unique_ptr StaticUniquePointerCast(std::unique_ptr&& ptr); diff --git a/include/Nazara/Core/Algorithm.inl b/include/Nazara/Core/Algorithm.inl index cd1a971fc..d3081931e 100644 --- a/include/Nazara/Core/Algorithm.inl +++ b/include/Nazara/Core/Algorithm.inl @@ -388,7 +388,7 @@ namespace Nz * \param key Key, has to exist in map */ template - const V& RetrieveConst(const std::unordered_map& map, const K& key) + const V& Retrieve(const std::unordered_map& map, const K& key) { auto it = map.find(key); assert(it != map.end()); diff --git a/src/Nazara/Shader/LangWriter.cpp b/src/Nazara/Shader/LangWriter.cpp index f38072fc7..2360c8c99 100644 --- a/src/Nazara/Shader/LangWriter.cpp +++ b/src/Nazara/Shader/LangWriter.cpp @@ -605,7 +605,7 @@ namespace Nz template void LangWriter::AppendIdentifier(const T& map, std::size_t id) { - const auto& structIdentifier = RetrieveConst(map, id); + const auto& structIdentifier = Retrieve(map, id); if (structIdentifier.moduleIndex != m_currentState->currentModuleIndex) Append(m_currentState->moduleNames[structIdentifier.moduleIndex], '.'); diff --git a/src/Nazara/Shader/SpirvAstVisitor.cpp b/src/Nazara/Shader/SpirvAstVisitor.cpp index 036b74759..74ac68961 100644 --- a/src/Nazara/Shader/SpirvAstVisitor.cpp +++ b/src/Nazara/Shader/SpirvAstVisitor.cpp @@ -31,7 +31,7 @@ namespace Nz auto SpirvAstVisitor::GetVariable(std::size_t varIndex) const -> const Variable& { - return RetrieveConst(m_variables, varIndex); + return Retrieve(m_variables, varIndex); } void SpirvAstVisitor::Visit(ShaderAst::AccessIndexExpression& node)