From 8f0d574dcb0dc0f94a3e5da13331b8913ec9cd93 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 10 Jul 2019 16:08:53 +0200 Subject: grid: don't implement grid_swap_row() in the header file --- grid.h | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'grid.h') diff --git a/grid.h b/grid.h index e170f6dd..ba31fe4e 100644 --- a/grid.h +++ b/grid.h @@ -17,27 +17,4 @@ grid_row_in_view(struct grid *grid, int row) return grid->rows[(grid->view + row + grid->num_rows) % grid->num_rows]; } -static inline void -grid_swap_row(struct grid *grid, int row_a, int row_b) -{ - assert(grid->offset >= 0); - assert(row_a != row_b); - assert(row_a >= 0); - assert(row_b >= 0); - - int real_a = (grid->offset + row_a + grid->num_rows) % grid->num_rows; - int real_b = (grid->offset + row_b + grid->num_rows) % grid->num_rows; - - struct row *tmp = grid->rows[real_a]; - grid->rows[real_a] = grid->rows[real_b]; - grid->rows[real_b] = tmp; - - grid->rows[real_a]->dirty = true; - grid->rows[real_b]->dirty = true; -} - -#if 0 -struct cell *grid_get_range(struct grid *grid, int start, int *length); -void grid_memclear(struct grid *grid, int start, int length); -void grid_memmove(struct grid *grid, int dst, int src, int length); -#endif +void grid_swap_row(struct grid *grid, int row_a, int row_b); -- cgit v1.3