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

/**
** \brief Iterate over entry of hash table
** \param ht  Iterated hash table
** \param f   Function applied to each entry
*/

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

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