Replace redundant code

This commit is contained in:
gingerBill
2019-02-06 16:06:48 +00:00
parent bc5c37ebb1
commit e1ae359a77
2 changed files with 2 additions and 2 deletions

View File

@@ -365,7 +365,7 @@ void arena_grow(Arena *arena, isize min_size) {
size = ALIGN_UP(size, ARENA_MIN_ALIGNMENT);
void *new_ptr = gb_alloc(arena->backing, size);
arena->ptr = cast(u8 *)new_ptr;
gb_zero_size(arena->ptr, size);
// gb_zero_size(arena->ptr, size); // NOTE(bill): This should already be zeroed
GB_ASSERT(arena->ptr == ALIGN_DOWN_PTR(arena->ptr, ARENA_MIN_ALIGNMENT));
arena->end = arena->ptr + size;
array_add(&arena->blocks, arena->ptr);

View File

@@ -1028,7 +1028,7 @@ Token consume_comment(AstFile *f, isize *end_line_) {
GB_ASSERT(tok.kind == Token_Comment);
isize end_line = tok.pos.line;
if (tok.string[1] == '*') {
for (isize i = 0; i < tok.string.len; i++) {
for (isize i = 2; i < tok.string.len; i++) {
if (tok.string[i] == '\n') {
end_line++;
}