Change casting syntax: cast(T)x transmute(T)x et al.

This commit is contained in:
Ginger Bill
2017-01-25 19:19:25 +00:00
parent 12498b2d39
commit b59a052e32
24 changed files with 655 additions and 540 deletions
+2 -2
View File
@@ -509,6 +509,7 @@ bool is_type_numeric(Type *t) {
if (t->kind == Type_Basic) {
return (t->Basic.flags & BasicFlag_Numeric) != 0;
}
// TODO(bill): Should this be here?
if (t->kind == Type_Vector) {
return is_type_numeric(t->Vector.elem);
}
@@ -1851,8 +1852,7 @@ gbString write_type_to_string(gbString str, Type *type) {
gbString type_to_string(Type *type) {
gbString str = gb_string_make(gb_heap_allocator(), "");
return write_type_to_string(str, type);
return write_type_to_string(gb_string_make(heap_allocator(), ""), type);
}