From c76ad6b158300182997d425cc73020005f869f3e Mon Sep 17 00:00:00 2001 From: ZuBsPaCe Date: Fri, 3 Sep 2021 07:44:46 +0200 Subject: GDScript: Count usages of member variables. Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE. --- modules/gdscript/gdscript_analyzer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gdscript') diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 6f76ca05dc..081d191823 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -2411,6 +2411,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod case GDScriptParser::ClassNode::Member::VARIABLE: p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_VARIABLE; p_identifier->variable_source = member.variable; + member.variable->usages += 1; break; case GDScriptParser::ClassNode::Member::FUNCTION: resolve_function_signature(member.function); -- cgit v1.2.3