mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
Adopt C99 bool in the findloop API.
This shouldn't be a disruptive change at all: findloop_run and findloop_is_loop_edge now return bool in place of int, but client code should automatically adjust without needing any changes.
This commit is contained in:
@ -37,7 +37,7 @@ void findloop_free_state(struct findloopstate *state)
|
||||
sfree(state);
|
||||
}
|
||||
|
||||
int findloop_is_loop_edge(struct findloopstate *pv, int u, int v)
|
||||
bool findloop_is_loop_edge(struct findloopstate *pv, int u, int v)
|
||||
{
|
||||
/*
|
||||
* Since the algorithm is intended for finding bridges, and a
|
||||
@ -56,8 +56,8 @@ int findloop_is_loop_edge(struct findloopstate *pv, int u, int v)
|
||||
return !(pv[u].bridge == v || pv[v].bridge == u);
|
||||
}
|
||||
|
||||
int findloop_run(struct findloopstate *pv, int nvertices,
|
||||
neighbour_fn_t neighbour, void *ctx)
|
||||
bool findloop_run(struct findloopstate *pv, int nvertices,
|
||||
neighbour_fn_t neighbour, void *ctx)
|
||||
{
|
||||
int u, v, w, root, index;
|
||||
int nbridges, nedges;
|
||||
|
Reference in New Issue
Block a user