mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 02:33:50 +01:00
port scripts to new zig
This commit is contained in:
parent
a3c21be56a
commit
cefaf24168
2 changed files with 4 additions and 3 deletions
|
@ -86,7 +86,7 @@ pub fn winContent(state: *State) !void {
|
|||
|
||||
for (preset_qualities) |quality| {
|
||||
if (c.igSelectable_Bool(quality.ptr, false, 0, .{ .x = 0.0, .y = 0.0 })) {
|
||||
std.mem.set(u8, &state.quality_buf, 0);
|
||||
@memset(&state.quality_buf, 0);
|
||||
std.mem.copy(u8, &state.quality_buf, quality);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,11 +32,12 @@ pub const Options = struct {
|
|||
};
|
||||
|
||||
pub fn render(writer: anytype, options: Options) !void {
|
||||
try (Renderer(@TypeOf(writer)){
|
||||
var renderer = Renderer(@TypeOf(writer)){
|
||||
.last_style = null,
|
||||
.writer = writer,
|
||||
.options = options,
|
||||
}).render();
|
||||
};
|
||||
try renderer.render();
|
||||
}
|
||||
|
||||
fn Renderer(comptime Writer: type) type {
|
||||
|
|
Loading…
Reference in a new issue