diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-08 12:54:52 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-08 12:54:52 +0100 |
| commit | 2a89d8021cf95f4a4d7dab269a262a1d2237f71b (patch) | |
| tree | e955f29749310c1be63b43a231d217e584d996f1 /src/tokenizer.cpp | |
| parent | 13deb4706c37acbababc6f60a1b6ec58c630a3f5 (diff) | |
Use templated `Array` with bounds checking
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 5c9809bd1..9e4151c50 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -338,7 +338,7 @@ typedef struct Tokenizer { isize line_count; isize error_count; - Array(String) allocated_strings; + Array<String> allocated_strings; } Tokenizer; @@ -460,7 +460,7 @@ gb_inline void destroy_tokenizer(Tokenizer *t) { gb_free(heap_allocator(), t->start); } for_array(i, t->allocated_strings) { - gb_free(heap_allocator(), t->allocated_strings.e[i].text); + gb_free(heap_allocator(), t->allocated_strings[i].text); } array_free(&t->allocated_strings); } |