Add union #maybe

This commit is contained in:
gingerBill
2020-02-01 11:10:28 +00:00
parent 4bcb667e97
commit 0f399a7294
10 changed files with 244 additions and 66 deletions
+2 -1
View File
@@ -111,6 +111,7 @@ Type_Info_Union :: struct {
tag_type: ^Type_Info,
custom_align: bool,
no_nil: bool,
maybe: bool,
};
Type_Info_Enum :: struct {
base: ^Type_Info,
@@ -1131,7 +1132,7 @@ __dynamic_array_reserve :: proc(array_: rawptr, elem_size, elem_align: int, cap:
array.allocator = context.allocator;
}
assert(array.allocator.procedure != nil);
if cap <= array.cap do return true;
old_size := array.cap * elem_size;