diff options
| author | gingerBill <bill@gingerbill.org> | 2022-12-20 14:19:55 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-12-20 14:19:55 +0000 |
| commit | 8fc9566a837fbd3fe52f3f1b5e766e122b3c2de2 (patch) | |
| tree | 8a511e3d57e8f27ed0d98dde37d060eb68437755 /src/parser.cpp | |
| parent | 134c7db4d21e80751833ed45fb4ace5d0ae3b7d2 (diff) | |
Use `*_set_update` where possible
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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); |