diff --git a/src/console/main.zig b/src/console/main.zig index a2b24aa..6d19624 100644 --- a/src/console/main.zig +++ b/src/console/main.zig @@ -195,15 +195,11 @@ const Model = struct { const children = try ctx.arena.create(std.ArrayList(*vxfw.Text)); children.* = std.ArrayList(*vxfw.Text).init(ctx.arena); - // const current_index = vm.current_items_view.cursor; - - // const children = try ctx.arena.alloc(*vxfw.Text, items.len); for (items.items) |*original_arc_child| { const arc_child = original_arc_child.retain(); defer if (arc_child.releaseUnwrap()) |item| item.deinit(); const child = arc_child.value.*; - // const is_active = i == current_index; const is_active = if (current_full_name) |c_full_name| models.FullName.eql(&c_full_name, &child.fullName) else @@ -271,31 +267,9 @@ pub fn main() !void { _ = gpa.deinit(); } - // const type2 = struct { - // allocator: *DebugAllocator, - // - // pub fn deinit(obj: *anyopaque) void { - // const self: *@This() = @ptrCast(@alignCast(obj)); - // _ = DebugAllocator.deinit(self.allocator); - // } - // }; - // var asd2: type2 = .{ - // .allocator = &gpa, - // }; - // const callback = asd1.Callback.create(&asd2); - // - // callback.call(); - var tsa = std.heap.ThreadSafeAllocator{ .child_allocator = gp_allocator }; const allocator = tsa.allocator(); - // const args = .{gpa}; - // const type1 = asd1.makeCallbackType(DebugAllocator.deinit, @TypeOf(args)); - // const instance1 = type1.init(args); - // // _ = instance1; - // const callback = instance1.makeCallback(); - // _ = callback; - var pool: std.Thread.Pool = undefined; try pool.init(.{ .allocator = allocator, @@ -329,12 +303,6 @@ pub fn main() !void { defer allocator.destroy(empty_text_element); empty_text_element.* = vxfw.Text{ .text = "Empty", - // .overflow = .clip, - // .softwrap = false, - // .style = .{ - // .bg = bg, - // .fg = fg, - // }, }; const items = try allocator.alloc(vxfw.Widget, 1); @@ -375,7 +343,6 @@ pub fn main() !void { defer app.deinit(); try app.run(model.widget(), .{}); - // std.Thread.sleep(10 * std.time.ns_per_s); model.app_common_model.usage_number.data -= 1; model.app_common_model.running = false;