diff options
author | ZuBsPaCe <kurt.rudin@gmx.net> | 2021-09-03 07:44:46 +0200 |
---|---|---|
committer | ZuBsPaCe <kurt.rudin@gmx.net> | 2021-09-03 07:44:46 +0200 |
commit | c76ad6b158300182997d425cc73020005f869f3e (patch) | |
tree | a987b27999cf52cf339c3e6aba34ce28164945ea | |
parent | a160a95ea67455c80c55da8385220d5c75a0aa60 (diff) |
GDScript: Count usages of member variables.
Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE.
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |