diff options
| author | gingerBill <bill@gingerbill.org> | 2022-12-18 23:24:34 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-12-18 23:24:34 +0000 |
| commit | 2a8fa8612de858d40b0812913817c8550db11630 (patch) | |
| tree | ef8835008e3c556aa0e07ef5361bf8dca035748a /src/parser.cpp | |
| parent | e27046098b12a678e9680d73d315b4c7c19c2101 (diff) | |
Use `fetch_add` rather than `+=`
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 2ccdac7fa..520f123d8 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -72,7 +72,7 @@ gb_internal Ast *alloc_ast_node(AstFile *f, AstKind kind) { node->kind = kind; node->file_id = f ? f->id : 0; - global_total_node_memory_allocated += size; + global_total_node_memory_allocated.fetch_add(size); return node; } |