Prepare tokenizer for optimizations

This commit is contained in:
gingerBill
2021-08-02 16:47:32 +01:00
parent 7f3d4cb504
commit b0e64ca7e8
2 changed files with 37 additions and 21 deletions
+1 -1
View File
@@ -8233,7 +8233,7 @@ gbFileContents gb_file_read_contents(gbAllocator a, b32 zero_terminate, char con
isize file_size = cast(isize)gb_file_size(&file);
if (file_size > 0) {
isize total_size = file_size + !!zero_terminate;
total_size = (total_size+7)&~7;
total_size = (total_size+15)&~15;
result.data = gb_alloc(a, total_size);
result.size = file_size;
gb_file_read_at(&file, result.data, result.size, 0);