diff --git a/src/core/Darwin.zig b/src/core/Darwin.zig index e46a9a30..c220a753 100644 --- a/src/core/Darwin.zig +++ b/src/core/Darwin.zig @@ -66,7 +66,7 @@ pub fn run(comptime on_each_update_fn: anytype, args_tuple: std.meta.ArgsTuple(@ pub fn tick(core: *Core) !void { var windows = core.windows.slice(); while (windows.next()) |window_id| { - const core_window = windows.get(window_id); + const core_window = core.windows.getValue(window_id); if (core_window.native) |native| { const native_window: *objc.app_kit.Window = native.window; diff --git a/src/module.zig b/src/module.zig index bc45e566..aac6ec1c 100644 --- a/src/module.zig +++ b/src/module.zig @@ -87,33 +87,6 @@ pub fn Objects(options: ObjectsOptions, comptime T: type) type { index: Index, objs: *Objects(options, T), - /// Same as Objects(T).set but doesn't employ safety checks - pub fn set(s: *@This(), id: ObjectID, value: T) void { - const data = &s.objs.internal.data; - const unpacked: PackedID = @bitCast(id); - data.set(unpacked.index, value); - } - - /// Same as Objects(T).get but doesn't employ safety checks - pub fn get(s: *@This(), id: ObjectID) T { - const data = &s.objs.internal.data; - const unpacked: PackedID = @bitCast(id); - return data.get(unpacked.index); - } - - /// Same as Objects(T).delete but doesn't employ safety checks - pub fn delete(s: *@This(), id: ObjectID) void { - const dead = &s.objs.internal.dead; - const recycling_bin = &s.objs.internal.recycling_bin; - - const unpacked: PackedID = @bitCast(id); - if (recycling_bin.items.len < recycling_bin.capacity) { - recycling_bin.appendAssumeCapacity(unpacked.index); - } else s.objs.internal.thrown_on_the_floor += 1; - - dead.set(unpacked.index); - } - pub fn next(s: *Slice) ?ObjectID { const dead = &s.objs.internal.dead; const generation = &s.objs.internal.generation;