From 1ab90de4931f07ea61b1195de602f282a853568b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 14 Jan 2023 12:33:42 +0000 Subject: Minimize `StringMap` structure usage --- src/check_stmt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index a2a688b13..21df1d0ea 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -626,7 +626,7 @@ gb_internal bool check_using_stmt_entity(CheckerContext *ctx, AstUsingStmt *us, defer (rw_mutex_unlock(&scope->mutex)); for (auto const &entry : scope->elements) { - String name = entry.key.string; + String name = entry.key; Entity *decl = entry.value; if (!is_entity_exported(decl)) continue; @@ -1323,7 +1323,7 @@ gb_internal void check_block_stmt_for_errors(CheckerContext *ctx, Ast *body) { ast_node(bs, BlockStmt, body); // NOTE(bill, 2020-09-23): This logic is prevent common erros with block statements // e.g. if cond { x := 123; } // this is an error - if (bs->scope != nullptr && bs->scope->elements.entries.count > 0) { + if (bs->scope != nullptr && bs->scope->elements.count > 0) { if (bs->scope->parent->node != nullptr) { switch (bs->scope->parent->node->kind) { case Ast_IfStmt: -- cgit v1.2.3