refactor: remove unused error return in Plane.put_yx and Plane.cursor_move_yx

This commit is contained in:
CJ van den Berg 2026-01-13 16:19:47 +01:00
parent 52dfc1e706
commit 2d5288aa6f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
16 changed files with 46 additions and 46 deletions

View file

@ -242,8 +242,8 @@ pub fn putc(self: *Plane, cell: *const Cell) !usize {
return self.putc_yx(self.row, self.col, cell);
}
pub fn putc_yx(self: *Plane, y: i32, x: i32, cell: *const Cell) !usize {
try self.cursor_move_yx(y, x);
pub fn putc_yx(self: *Plane, y: i32, x: i32, cell: *const Cell) usize {
self.cursor_move_yx(y, x);
const w = if (cell.cell.char.width == 0) self.window.gwidth(cell.cell.char.grapheme) else cell.cell.char.width;
if (w == 0) return w;
self.window.writeCell(@intCast(self.col), @intCast(self.row), cell.cell);
@ -280,7 +280,7 @@ pub fn cursor_x(self: Plane) i32 {
return self.col;
}
pub fn cursor_move_yx(self: *Plane, y: i32, x: i32) error{}!void {
pub fn cursor_move_yx(self: *Plane, y: i32, x: i32) void {
if (self.window.height == 0 or self.window.width == 0) return;
if (self.window.height <= y or self.window.width <= x) return;
if (y >= 0) self.row = y;