From ef28991e7ca78e0f1ff71945c9e514c5df4fafac Mon Sep 17 00:00:00 2001 From: Timo Schmidt Date: Wed, 5 Apr 2023 20:02:49 +0200 Subject: [PATCH] Remove unnecesary check in obstacle count --- srcs/solution.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/srcs/solution.c b/srcs/solution.c index 3636e0f..4aa1523 100644 --- a/srcs/solution.c +++ b/srcs/solution.c @@ -6,7 +6,7 @@ /* By: apago +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/04 21:46:57 by tischmid #+# #+# */ -/* Updated: 2023/04/05 19:06:00 by apago ### ########.fr */ +/* Updated: 2023/04/05 19:59:57 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -38,8 +38,6 @@ int count_obstacles(t_map *map, int idx, int sq_size) if (sq_size == 0) return (0); - if (sq_size == 1) - return (get_index(map, idx, 0, 0)); if (idx + (sq_size - 1) * (map->meta.width + 1) > map->meta.width * map->meta.height) return (-1);