fmt.odin uses ^[]byte rather than custom Buffer type

This commit is contained in:
Ginger Bill
2017-02-26 15:34:02 +00:00
parent f29e303ce7
commit 9bc37f4400
4 changed files with 222 additions and 241 deletions
+1 -5
View File
@@ -460,11 +460,7 @@ __slice_append :: proc(slice_: rawptr, elem_size, elem_align: int,
return slice.count;
}
ok := true;
if item_count > (slice.capacity-slice.count) {
item_count = (slice.capacity-slice.count);
}
item_count = min(slice.capacity-slice.count, item_count);
if item_count > 0 {
data := cast(^byte)slice.data;
assert(data != nil);