aboutsummaryrefslogtreecommitdiff
path: root/src/ht/ft_htiter.c
blob: 5473412c45d4c9bf126446e6430b2424c66d1733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "libft_ht.h"

/*
** Iterate function `f` over every pair in `ht`.
*/

void	ft_htiter(t_ftht *ht, void (*f)(t_ftht_content*))
{
	size_t	i;

	i = 0;
	while (i < ht->size)
	{
		ft_lstiter(ht->entries[i], (void (*)(void*))f);
		i++;
	}
}