mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
grid: reflow: make tracking_points array 'const'
The elements aren't, and cannot be, const. But the array itself can, and should be.
This commit is contained in:
parent
a9af8290ab
commit
5e2e59679b
2 changed files with 2 additions and 2 deletions
2
grid.c
2
grid.c
|
|
@ -57,7 +57,7 @@ void
|
||||||
grid_reflow(struct grid *grid, int new_rows, int new_cols,
|
grid_reflow(struct grid *grid, int new_rows, int new_cols,
|
||||||
int old_screen_rows, int new_screen_rows,
|
int old_screen_rows, int new_screen_rows,
|
||||||
size_t tracking_points_count,
|
size_t tracking_points_count,
|
||||||
struct coord *_tracking_points[static tracking_points_count])
|
struct coord *const _tracking_points[static tracking_points_count])
|
||||||
{
|
{
|
||||||
struct row *const *old_grid = grid->rows;
|
struct row *const *old_grid = grid->rows;
|
||||||
const int old_rows = grid->num_rows;
|
const int old_rows = grid->num_rows;
|
||||||
|
|
|
||||||
2
grid.h
2
grid.h
|
|
@ -10,7 +10,7 @@ void grid_reflow(
|
||||||
struct grid *grid, int new_rows, int new_cols,
|
struct grid *grid, int new_rows, int new_cols,
|
||||||
int old_screen_rows, int new_screen_rows,
|
int old_screen_rows, int new_screen_rows,
|
||||||
size_t tracking_points_count,
|
size_t tracking_points_count,
|
||||||
struct coord *tracking_points[static tracking_points_count]);
|
struct coord *const tracking_points[static tracking_points_count]);
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
grid_row_absolute(const struct grid *grid, int row_no)
|
grid_row_absolute(const struct grid *grid, int row_no)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue