You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix incorrect unused local var warning in shader blocks
This commit is contained in:
@@ -5208,9 +5208,15 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
if (check_warnings) {
|
if (check_warnings) {
|
||||||
StringName func_name;
|
StringName func_name;
|
||||||
|
BlockNode *b = p_block;
|
||||||
|
|
||||||
if (p_block && p_block->parent_function) {
|
while (b) {
|
||||||
func_name = p_block->parent_function->name;
|
if (b->parent_function) {
|
||||||
|
func_name = b->parent_function->name;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
b = b->parent_block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_parse_used_identifier(identifier, ident_type, func_name);
|
_parse_used_identifier(identifier, ident_type, func_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user