fix: destructor should not change pointer to undefined
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s

This commit is contained in:
2024-11-16 20:12:02 +01:00
parent ec71e34958
commit 90af887d77
12 changed files with 0 additions and 12 deletions

View File

@@ -52,7 +52,6 @@ pub fn Layout(comptime Event: type, comptime Renderer: type) type {
pub fn deinit(this: *LayoutType) void {
this.vtable.deinit(this);
this.* = undefined;
}
pub fn createFrom(object: anytype) LayoutType {

View File

@@ -70,7 +70,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
},
}
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -109,7 +109,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
}
this.containers.deinit();
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -77,7 +77,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
}
this.elements.deinit();
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -67,7 +67,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
},
}
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -61,7 +61,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
},
}
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -109,7 +109,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
}
this.containers.deinit();
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -77,7 +77,6 @@ pub fn Layout(comptime Event: type, comptime Element: type, comptime Renderer: t
}
this.elements.deinit();
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) !*Events {

View File

@@ -58,7 +58,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
pub fn deinit(this: *WidgetType) void {
this.vtable.deinit(this);
this.* = undefined;
}
pub fn createFrom(object: anytype) WidgetType {

View File

@@ -42,7 +42,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
this.contents.deinit();
this.line_index.deinit();
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) ?Event {

View File

@@ -23,7 +23,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
pub fn deinit(this: *@This()) void {
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) ?Event {

View File

@@ -37,7 +37,6 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type {
pub fn deinit(this: *@This()) void {
this.allocator.destroy(this);
this.* = undefined;
}
pub fn handle(this: *@This(), event: Event) ?Event {