Skip to content
Snippets Groups Projects
Commit 051fd430 authored by AlQuemist's avatar AlQuemist
Browse files

Sim/Export/MaterialKeyHandler: implement a C++17 version for std::map::contains method (C++20)

parent 5e8731bd
No related branches found
No related tags found
1 merge request!2727Avoid using C++20 features to keep the libraries maintainable on older systems
......@@ -26,7 +26,14 @@ void MaterialKeyHandler::insertMaterial(const Material* mat)
m_Mat2Unique.emplace(mat, mat);
const std::string key = "material_" + mat->materialName();
ASSERT(!m_Key2Mat.contains(key)); // material must not be exported more than once
// material must not be exported more than once
#ifdef BA_CPP20
ASSERT(!m_Key2Mat.contains(key));
#else
ASSERT(m_Key2Mat.find(key) == m_Key2Mat.end());
#endif // BA_CPP20
m_Key2Mat.emplace(key, mat);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment