diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-12-01 14:12:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 14:12:59 +0300 |
commit | 56f73a7e294972ddabbada46fc75f3f7ef8ca36f (patch) | |
tree | 3ef72ca65c8d243298a681d5be5eb3d99ff15e63 /servers/rendering/shader_warnings.cpp | |
parent | e223a9c12905b99bb1fe93a56ae634b34eadd359 (diff) | |
parent | 5ba93619fae4eedca092bd7e4551b9034d725ff4 (diff) |
Merge pull request #55508 from Chaosus/shader_fix_semicolon
Diffstat (limited to 'servers/rendering/shader_warnings.cpp')
-rw-r--r-- | servers/rendering/shader_warnings.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/shader_warnings.cpp b/servers/rendering/shader_warnings.cpp index 0b8476478c..bffae484a8 100644 --- a/servers/rendering/shader_warnings.cpp +++ b/servers/rendering/shader_warnings.cpp @@ -61,6 +61,8 @@ String ShaderWarning::get_message() const { return vformat("The varying '%s' is declared but never used.", subject); case UNUSED_LOCAL_VARIABLE: return vformat("The local variable '%s' is declared but never used.", subject); + case FORMATTING_ERROR: + return subject; default: break; } @@ -82,6 +84,7 @@ String ShaderWarning::get_name_from_code(Code p_code) { "UNUSED_UNIFORM", "UNUSED_VARYING", "UNUSED_LOCAL_VARIABLE", + "FORMATTING_ERROR", }; static_assert((sizeof(names) / sizeof(*names)) == WARNING_MAX, "Amount of warning types don't match the amount of warning names."); @@ -110,6 +113,7 @@ static void init_code_to_flags_map() { code_to_flags_map->insert(ShaderWarning::UNUSED_UNIFORM, ShaderWarning::UNUSED_UNIFORM_FLAG); code_to_flags_map->insert(ShaderWarning::UNUSED_VARYING, ShaderWarning::UNUSED_VARYING_FLAG); code_to_flags_map->insert(ShaderWarning::UNUSED_LOCAL_VARIABLE, ShaderWarning::UNUSED_LOCAL_VARIABLE_FLAG); + code_to_flags_map->insert(ShaderWarning::FORMATTING_ERROR, ShaderWarning::FORMATTING_ERROR_FLAG); } ShaderWarning::CodeFlags ShaderWarning::get_flags_from_codemap(const Map<Code, bool> &p_map) { |