diff options
| author | gingerBill <bill@gingerbill.org> | 2021-07-12 11:03:12 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-07-12 11:03:12 +0100 |
| commit | 76707e1d2f3a33bc5dabf367318ccd76ce242b6a (patch) | |
| tree | f8858e15dba0312f85e0b25f7be12a97fd420c9b /src/check_type.cpp | |
| parent | ff2e5c3efe931e6a088c2368b0ce5d5c21f03c65 (diff) | |
Add sanity casts for 32/64 bit correctness
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Entity *>(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); |