From 76707e1d2f3a33bc5dabf367318ccd76ce242b6a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 12 Jul 2021 11:03:12 +0100 Subject: Add sanity casts for 32/64 bit correctness --- src/check_type.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_type.cpp') diff --git a/src/check_type.cpp b/src/check_type.cpp index 4b4df4f3a..bf84dbcce 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2218,7 +2218,7 @@ Type *make_soa_struct_internal(CheckerContext *ctx, Ast *array_typ_expr, Ast *el soa_struct->Struct.scope = scope; } else if (is_type_array(elem)) { Type *old_array = base_type(elem); - field_count = old_array->Array.count; + field_count = cast(isize)old_array->Array.count; soa_struct = alloc_type_struct(); soa_struct->Struct.fields = array_make(heap_allocator(), field_count+extra_field_count); @@ -2238,7 +2238,7 @@ Type *make_soa_struct_internal(CheckerContext *ctx, Ast *array_typ_expr, Ast *el str_lit("w") }; - for (i64 i = 0; i < old_array->Array.count; i++) { + for (isize i = 0; i < cast(isize)old_array->Array.count; i++) { Type *field_type = nullptr; if (soa_kind == StructSoa_Fixed) { GB_ASSERT(count >= 0); -- cgit v1.2.3