mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 07:43:13 +00:00
Use templated Array with bounds checking
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user