Shader: Use constexpr maps for static data

This commit is contained in:
SirLynix
2022-04-05 08:41:47 +02:00
parent 18edd41048
commit 262c82b9e1
6 changed files with 43 additions and 37 deletions

View File

@@ -87,7 +87,7 @@ namespace Nz::ShaderLang
template<typename T> void HandleUniqueAttribute(ShaderAst::ExpressionValue<T>& targetAttribute, Attribute&& attribute);
template<typename T> void HandleUniqueAttribute(ShaderAst::ExpressionValue<T>& targetAttribute, Attribute&& attribute, T defaultValue);
template<typename T> void HandleUniqueStringAttribute(ShaderAst::ExpressionValue<T>& targetAttribute, Attribute&& attribute, const std::unordered_map<std::string, T>& map, std::optional<T> defaultValue = {});
template<typename T, typename M> void HandleUniqueStringAttribute(ShaderAst::ExpressionValue<T>& targetAttribute, Attribute&& attribute, const M& map, std::optional<T> defaultValue = {});
static int GetTokenPrecedence(TokenType token);