diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-30 20:24:32 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-30 20:24:32 +0100 |
| commit | 6500b1ca9ce911d3db7c94ee3f4ee38489b8861a (patch) | |
| tree | 4d2766b1bea4322a6e5851f53af33178d9643a5c /src/lst/ft_lstremove_if.c | |
| parent | aa244ec3fb071a7fd08494d04cc865b281502804 (diff) | |
| download | libft-6500b1ca9ce911d3db7c94ee3f4ee38489b8861a.tar.gz libft-6500b1ca9ce911d3db7c94ee3f4ee38489b8861a.tar.bz2 libft-6500b1ca9ce911d3db7c94ee3f4ee38489b8861a.zip | |
Renaming t_list -> t_ftlst, changing feature adding by header
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); } |
