diff options
Diffstat (limited to 'src/lst/ft_lstremove_if.c')
| -rw-r--r-- | src/lst/ft_lstremove_if.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lst/ft_lstremove_if.c b/src/lst/ft_lstremove_if.c index 2fa06a3..a597c2e 100644 --- a/src/lst/ft_lstremove_if.c +++ b/src/lst/ft_lstremove_if.c @@ -11,16 +11,17 @@ /* ************************************************************************** */ #include "libft.h" +#include "libft_lst.h" -void ft_lstremove_if(t_list **lst, +void ft_lstremove_if(t_ftlst **lst, t_ftbool (*equal)(void *ref, void *content), void *ref, void (*del)(void *content)) { - t_list *saved_next; + t_ftlst *saved_next; if (lst == NULL || *lst == NULL) return ; - if (!equal(ref, &(*lst)->val)) + if (!equal(ref, &(*lst)->content)) { ft_lstremove_if(&(*lst)->next, equal, ref, del); return ; @@ -28,5 +29,5 @@ void ft_lstremove_if(t_list **lst, saved_next = (*lst)->next; ft_lstdelone(*lst, del); *lst = saved_next; - ref_ft_list_remove_if(lst, equal, ref, del); + ft_lstremove_if(lst, equal, ref, del); } |
