Try to fix GCC error
This commit is contained in:
parent
c496944b37
commit
9b1d8b5fcf
|
|
@ -40,7 +40,7 @@ namespace Nz
|
|||
template<typename T> void HashCombine(std::size_t& seed, const T& v);
|
||||
template<typename T> bool IsPowerOfTwo(T value);
|
||||
template<typename K, typename V> V& Retrieve(std::unordered_map<K, V>& map, const K& key);
|
||||
template<typename K, typename V> const V& Retrieve(const std::unordered_map<K, V>& map, const K& key);
|
||||
template<typename K, typename V> const V& RetrieveConst(const std::unordered_map<K, V>& map, const K& key);
|
||||
template<typename T> T ReverseBits(T integer);
|
||||
template<typename To, typename From> To SafeCast(From&& value);
|
||||
template<typename T, typename U>std::unique_ptr<T> StaticUniquePointerCast(std::unique_ptr<U>&& ptr);
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ namespace Nz
|
|||
* \param key Key, has to exist in map
|
||||
*/
|
||||
template<typename K, typename V>
|
||||
const V& Retrieve(const std::unordered_map<K, V>& map, const K& key)
|
||||
const V& RetrieveConst(const std::unordered_map<K, V>& map, const K& key)
|
||||
{
|
||||
auto it = map.find(key);
|
||||
assert(it != map.end());
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ namespace Nz
|
|||
template<typename T>
|
||||
void LangWriter::AppendIdentifier(const T& map, std::size_t id)
|
||||
{
|
||||
const auto& structIdentifier = Retrieve(map, id);
|
||||
const auto& structIdentifier = RetrieveConst(map, id);
|
||||
if (structIdentifier.moduleIndex != m_currentState->currentModuleIndex)
|
||||
Append(m_currentState->moduleNames[structIdentifier.moduleIndex], '.');
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Nz
|
|||
|
||||
auto SpirvAstVisitor::GetVariable(std::size_t varIndex) const -> const Variable&
|
||||
{
|
||||
return Retrieve(m_variables, varIndex);
|
||||
return RetrieveConst(m_variables, varIndex);
|
||||
}
|
||||
|
||||
void SpirvAstVisitor::Visit(ShaderAst::AccessIndexExpression& node)
|
||||
|
|
|
|||
Loading…
Reference in New Issue