points теперь слайс
This commit is contained in:
@@ -44,7 +44,7 @@ pub fn getProperty(self: Object, tag: std.meta.Tag(PropertyData)) ?*const Proper
|
||||
pub fn setProperty(self: *Object, allocator: std.mem.Allocator, prop: Property) !void {
|
||||
for (self.properties.items, 0..) |*p, i| {
|
||||
if (std.meta.activeTag(p.data) == std.meta.activeTag(prop.data)) {
|
||||
if (p.data == .points) p.data.points.deinit(allocator);
|
||||
if (p.data == .points) allocator.free(p.data.points);
|
||||
self.properties.items[i] = prop;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user