aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-05-02 22:45:28 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-05-02 22:45:28 +0300
commit3cc9f5df8be0a10c965137c7d2b7886cad2a7bc1 (patch)
tree17488a95c8b3f09385610a841c9e348ff833a3f2
parent32c63a1824fa87c8b2b66783c5cff2aabe6ac9e6 (diff)
downloadastar-3cc9f5df8be0a10c965137c7d2b7886cad2a7bc1.tar.xz
Remove unneeded includes
-rw-r--r--Makefile4
-rw-r--r--bmp.c2
-rw-r--r--main.c2
-rw-r--r--path.c1
4 files changed, 2 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 3c7addb..c207fad 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,10 @@ CC=gcc
EXECUTABLE=astar
astar: *.c *.h
- $(CC) -Wall -Wpedantic -Wextra -Werror -O3 -o $(EXECUTABLE) priority_queue.c map.c stack.c path.c bmp.c main.c -lncurses -lm
+ $(CC) -Wall -Wpedantic -Wextra -Werror -O3 -o $(EXECUTABLE) priority_queue.c map.c stack.c path.c bmp.c main.c -lncurses
debug: *.c *.h
- $(CC) -Wall -g -o $(EXECUTABLE) -DPID_MESSAGE priority_queue.c map.c stack.c path.c bmp.c main.c -lncurses -lm
+ $(CC) -Wall -g -o $(EXECUTABLE) -DPID_MESSAGE priority_queue.c map.c stack.c path.c bmp.c main.c -lncurses
clean:
rm ./$(EXECUTABLE)
diff --git a/bmp.c b/bmp.c
index 601cdfe..6886a30 100644
--- a/bmp.c
+++ b/bmp.c
@@ -5,9 +5,7 @@
#include <curses.h>
#include "map.h"
-#include "path.h"
#include "structs.h"
-#include "priority_queue.h"
/* TODO: clean up, do defines or whatever */
void map_to_bmp(Map map, size_t map_width, size_t map_height, Position start, Position goal, Path path, char **visited, char *filename) {
diff --git a/main.c b/main.c
index cd2b53a..3a0238b 100644
--- a/main.c
+++ b/main.c
@@ -10,7 +10,6 @@
#include "structs.h"
#include "config.h"
#include "error.h"
-#include "priority_queue.h"
#include "path.h"
#include "bmp.h"
@@ -20,7 +19,6 @@
- save pathfinding to a series of BMPs
- less magical values
- MORE MAPS FOR THE MAP PEOPLE
- - Clean up unused `#include`s
- keybinding help screen
- 'clean' rendering mode, without all the ugly shit
- Comments */
diff --git a/path.c b/path.c
index a571963..d60d800 100644
--- a/path.c
+++ b/path.c
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <string.h>
#include <curses.h>
-#include <math.h>
#include <time.h>
#include <unistd.h>