From 1685dc927bc4e8f0baa4a02e44d944afa068b92c Mon Sep 17 00:00:00 2001 From: Nakidai Date: Fri, 1 Dec 2023 23:07:02 +0300 Subject: [PATCH] Remove functions for free screen and player as they're unused --- include/player.h | 1 - include/screen.h | 2 -- src/player.c | 4 ---- src/screen.c | 6 ------ 4 files changed, 13 deletions(-) diff --git a/include/player.h b/include/player.h index e920a90..c5ed465 100644 --- a/include/player.h +++ b/include/player.h @@ -22,7 +22,6 @@ struct player_t }; Player *playerCreate(Direction direction, int x, int y, int score); -void playerFree(Player *player); bool playerCheckSelfCollision(Player *player); bool playerCheckFoodCollision(Player *player, Food food); diff --git a/include/screen.h b/include/screen.h index 6d03c97..cc78e7f 100644 --- a/include/screen.h +++ b/include/screen.h @@ -12,8 +12,6 @@ typedef struct screen_t } Screen; Screen *screenCreate(int width, int height, Point fill_value); -void screenFree(Screen *screen); - void screenShow(Screen *screen); static inline Point *screenGetPoint(Screen *screen, int x, int y) diff --git a/src/player.c b/src/player.c index 57d51b7..046ceda 100644 --- a/src/player.c +++ b/src/player.c @@ -19,10 +19,6 @@ Player *playerCreate(Direction direction, int x, int y, int score) return player; } -void playerFree(Player *player) -{ -} - bool playerCheckFoodCollision(Player *player, Food food) { for (PlayerNode *node = player->tail; node != NULL; node = node->next) diff --git a/src/screen.c b/src/screen.c index 8103e29..704cf5e 100644 --- a/src/screen.c +++ b/src/screen.c @@ -15,12 +15,6 @@ Screen *screenCreate(int width, int height, Point fill_value) return out; } -void screenFree(Screen *screen) -{ - free(screen->screen); - free(screen); -} - void screenShow(Screen *screen) { int x, y, i;