Remove usage of function like macro VEC_INIT
authorLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Mon, 19 Feb 2024 20:51:15 +0000 (21:51 +0100)
committerLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Mon, 19 Feb 2024 20:51:15 +0000 (21:51 +0100)
The macro has been removed from Libft because it has to conform to the
42 Norm, which forbids function like macros.

src/sim_node.c

index eee368e46edf7c42285bde471e7f1e756faf694f..e9656c18a4228fba6689eed4132f4689bb70861c 100644 (file)
@@ -60,7 +60,8 @@ void  update_nodes(t_vec *nodes)
        size_t                  i;
        t_state                 state;
        t_node                  *cur_node;
-       static t_vec    connected_nodes = VEC_INIT(sizeof(t_node *));
+       static t_vec    connected_nodes = {.capacity = 0, .size = 0,
+                                               .el_size = sizeof(t_node *), .vec = NULL};
 
        if (!nodes)
        {