It works but there is a memory issue... (parsing in tick update)

This commit is contained in:
2024-03-10 20:09:04 -04:00
parent c80254adbc
commit 304e710c16
16 changed files with 439 additions and 82 deletions

View File

@ -273,12 +273,9 @@ array_set_capacity :: proc( self : ^Array( $ Type ), new_capacity : u64 ) -> All
return result_code
}
using new_self : Array(Type)
header = cast( ^ArrayHeader(Type)) new_mem;
data = cast( [^]Type ) (cast( [^]ArrayHeader(Type)) header)[ 1:]
capacity = new_capacity
num = self.num
(self ^) = new_self
self.header = cast( ^ArrayHeader(Type)) new_mem;
self.data = cast( [^]Type ) (cast( [^]ArrayHeader(Type)) self.header)[ 1:]
self.capacity = new_capacity
self.num = self.num
return result_code
}