diff options
Diffstat (limited to 'src/grid.c')
-rw-r--r-- | src/grid.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -13,11 +13,11 @@ Grid grid_create(unsigned int width, unsigned int height, char *fill) Grid grid = {.grid = malloc_s(mem_height), .dimens = dimens}; // Fill the grid - for (unsigned int y = 0; y < height; y++) + for (unsigned int y = 0U; y < height; y++) { grid.grid[y] = malloc_s(mem_width); - for (unsigned int x = 0; x < width; x++) + for (unsigned int x = 0U; x < width; x++) grid.grid[y][x] = fill; } @@ -36,9 +36,9 @@ void grid_set(Grid grid, Position pos, char *value) void grid_print(Grid grid) { - for (unsigned int y = 0; y < grid.dimens.height; y++) + for (unsigned int y = 0U; y < grid.dimens.height; y++) { - for (unsigned int x = 0; x < grid.dimens.width; x++) + for (unsigned int x = 0U; x < grid.dimens.width; x++) printf("%s", grid.grid[y][x]); printf("\n"); @@ -48,7 +48,7 @@ void grid_print(Grid grid) void grid_destroy(Grid grid) { // Deallocate the memory of the grid - for (unsigned int y = 0; y < grid.dimens.height; y++) + for (unsigned int y = 0U; y < grid.dimens.height; y++) free(grid.grid[y]); free(grid.grid); |