Skip to content

Commit

Permalink
use Rzlist methods. fixes #337
Browse files Browse the repository at this point in the history
  • Loading branch information
treseco committed Dec 22, 2023
1 parent 10f0359 commit 0dcc2db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RizinUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ typedef struct rz_list_iter_t RzListIter;

template<typename T, typename F> void rz_list_foreach_cpp(RzList *list, const F &func)
{
for(RzListIter *it = list->head; it; it = it->n)
for(RzListIter *it = list->head; it; it = rz_list_iter_get_next(it))
{
func(reinterpret_cast<T *>(it->data));
func(reinterpret_cast<T *>(rz_list_iter_get_data(it)));
}
}

Expand Down

0 comments on commit 0dcc2db

Please sign in to comment.