Use *_set_update where possible

This commit is contained in:
gingerBill
2022-12-20 14:19:55 +00:00
parent 134c7db4d2
commit 8fc9566a83
6 changed files with 30 additions and 37 deletions
+1 -3
View File
@@ -3126,13 +3126,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
}
if (string_set_exists(&name_set, name)) {
if (string_set_update(&name_set, name)) {
error(op.expr, "Field argument name '%.*s' already exists", LIT(name));
} else {
array_add(&types, arg_type->Slice.elem);
array_add(&names, name);
string_set_add(&name_set, name);
}
}