mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-02 18:11:49 -07:00
+2
-2
@@ -908,8 +908,8 @@ gb_internal ExactValue exact_binary_operator_value(TokenKind op, ExactValue x, E
|
|||||||
if (op != Token_Add) goto error;
|
if (op != Token_Add) goto error;
|
||||||
|
|
||||||
// NOTE(bill): How do you minimize this over allocation?
|
// NOTE(bill): How do you minimize this over allocation?
|
||||||
String sx = x.value_string;
|
String16 sx = x.value_string16;
|
||||||
String sy = y.value_string;
|
String16 sy = y.value_string16;
|
||||||
isize len = sx.len+sy.len;
|
isize len = sx.len+sy.len;
|
||||||
u16 *data = gb_alloc_array(permanent_allocator(), u16, len);
|
u16 *data = gb_alloc_array(permanent_allocator(), u16, len);
|
||||||
gb_memmove(data, sx.text, sx.len*gb_size_of(u16));
|
gb_memmove(data, sx.text, sx.len*gb_size_of(u16));
|
||||||
|
|||||||
+3
-3
@@ -410,7 +410,7 @@ gb_internal u32 type_info_flags_of_type(Type *type) {
|
|||||||
flags |= TypeInfoFlag_Comparable;
|
flags |= TypeInfoFlag_Comparable;
|
||||||
}
|
}
|
||||||
if (is_type_simple_compare(type)) {
|
if (is_type_simple_compare(type)) {
|
||||||
flags |= TypeInfoFlag_Comparable;
|
flags |= TypeInfoFlag_Simple_Compare;
|
||||||
}
|
}
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
@@ -1725,7 +1725,7 @@ gb_internal bool is_type_u8_ptr(Type *t) {
|
|||||||
t = base_type(t);
|
t = base_type(t);
|
||||||
if (t == nullptr) { return false; }
|
if (t == nullptr) { return false; }
|
||||||
if (t->kind == Type_Pointer) {
|
if (t->kind == Type_Pointer) {
|
||||||
return is_type_u8(t->Slice.elem);
|
return is_type_u8(t->Pointer.elem);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1766,7 +1766,7 @@ gb_internal bool is_type_u16_ptr(Type *t) {
|
|||||||
t = base_type(t);
|
t = base_type(t);
|
||||||
if (t == nullptr) { return false; }
|
if (t == nullptr) { return false; }
|
||||||
if (t->kind == Type_Pointer) {
|
if (t->kind == Type_Pointer) {
|
||||||
return is_type_u16(t->Slice.elem);
|
return is_type_u16(t->Pointer.elem);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user