diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-03 19:05:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-03 19:05:55 +0200 |
commit | 344a453bb8905f7c6f8f05d54469955eed9b2818 (patch) | |
tree | 16bc812a9cfdf62b9a496103e86e2707263941c6 /modules/gdscript/gdscript_parser.cpp | |
parent | 1aa1398012b9132a26ffe6aa4cc9d4dde984b409 (diff) | |
parent | dec20a987b40e7625b38e520cc223723da9bae2a (diff) | |
download | redot-engine-344a453bb8905f7c6f8f05d54469955eed9b2818.tar.gz |
Merge pull request #22681 from akien-mga/fix-warnings
Fix warnings on release builds and some MSVC warnings
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 2fa5084d84..a79fcccaeb 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -56,7 +56,9 @@ T *GDScriptParser::alloc_node() { return t; } +#ifdef DEBUG_ENABLED static String _find_function_name(const GDScriptParser::OperatorNode *p_call); +#endif // DEBUG_ENABLED bool GDScriptParser::_end_statement() { @@ -747,7 +749,6 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s while (!bfn && b) { if (b->variables.has(identifier)) { IdentifierNode *id = alloc_node<IdentifierNode>(); - LocalVarNode *lv = b->variables[identifier]; id->name = identifier; id->declared_block = b; id->line = id_line; @@ -755,6 +756,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s bfn = true; #ifdef DEBUG_ENABLED + LocalVarNode *lv = b->variables[identifier]; switch (tokenizer->get_token()) { case GDScriptTokenizer::TK_OP_ASSIGN_ADD: case GDScriptTokenizer::TK_OP_ASSIGN_BIT_AND: |