From 8fc9566a837fbd3fe52f3f1b5e766e122b3c2de2 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 20 Dec 2022 14:19:55 +0000 Subject: Use `*_set_update` where possible --- src/parser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index eb006cb24..ad22ce5ff 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4967,10 +4967,9 @@ gb_internal AstPackage *try_add_import_path(Parser *p, String const &path, Strin String const FILE_EXT = str_lit(".odin"); MUTEX_GUARD_BLOCK(&p->import_mutex) { - if (string_set_exists(&p->imported_files, path)) { + if (string_set_update(&p->imported_files, path)) { return nullptr; } - string_set_add(&p->imported_files, path); } AstPackage *pkg = gb_alloc_item(permanent_allocator(), AstPackage); -- cgit v1.2.3