Remove deprecated to avoid warnings for VarString. Fix issue casting subarrays to distinct types.

This commit is contained in:
Christoffer Lerno
2023-03-08 00:13:38 +01:00
committed by Christoffer Lerno
parent 89de0a70d2
commit cfba19ab77
2 changed files with 10 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ typedef Text = VarString;
const usz MIN_CAPACITY = 16;
fn VarString new_with_capacity(usz capacity, Allocator* allocator = mem::heap()) @deprecated
fn VarString new_with_capacity(usz capacity, Allocator* allocator = mem::heap())
{
if (capacity < MIN_CAPACITY) capacity = MIN_CAPACITY;
StringData* data = malloc(StringData, 1, .using = allocator, .end_padding = capacity);
@@ -19,7 +19,7 @@ fn VarString new_with_capacity(usz capacity, Allocator* allocator = mem::heap())
return (VarString)data;
}
fn VarString new(String c) @deprecated
fn VarString new(String c)
{
usz len = c.len;
VarString str = new_with_capacity(len);