Skip to content

Commit

Permalink
Merge pull request #53507 from qarmin/fast_as_snail
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Oct 8, 2021
2 parents b280da0 + 1558f4a commit 07094f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions modules/gdscript/gdscript_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,8 +1188,8 @@ static bool _guess_identifier_type(GDScriptCompletionContext &p_context, const S
}
}

for (const List<GDScriptParser::Node *>::Element *E = blk->statements.front(); E; E = E->next()) {
const GDScriptParser::Node *expr = E->get();
for (int z = 0; z < blk->statements.size(); z++) {
const GDScriptParser::Node *expr = blk->statements[z];
if (expr->line > p_context.line || expr->type != GDScriptParser::Node::TYPE_OPERATOR) {
continue;
}
Expand Down
8 changes: 4 additions & 4 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2793,8 +2793,8 @@ void GDScriptParser::_transform_match_statment(MatchNode *p_match_statement) {
op->arguments.push_back(local_var->assign);
local_var->assign_op = op;

branch->body->statements.push_front(op);
branch->body->statements.push_front(local_var);
branch->body->statements.insert(0, op);
branch->body->statements.insert(0, local_var);
}

compiled_branch.body = branch->body;
Expand Down Expand Up @@ -8252,8 +8252,8 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
Node *last_var_assign = nullptr;

// Check each statement
for (List<Node *>::Element *E = p_block->statements.front(); E; E = E->next()) {
Node *statement = E->get();
for (int z = 0; z < p_block->statements.size(); z++) {
Node *statement = p_block->statements[z];
switch (statement->type) {
case Node::TYPE_NEWLINE:
case Node::TYPE_BREAKPOINT: {
Expand Down
2 changes: 1 addition & 1 deletion modules/gdscript/gdscript_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class GDScriptParser {
struct BlockNode : public Node {
ClassNode *parent_class;
BlockNode *parent_block;
List<Node *> statements;
Vector<Node *> statements;
Map<StringName, LocalVarNode *> variables;
bool has_return = false;
bool can_break = false;
Expand Down

0 comments on commit 07094f5

Please sign in to comment.