Skip to content

Commit

Permalink
one more glib use
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Aug 6, 2023
1 parent 9faf01b commit 5968e32
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libgnucash/engine/gnc-pricedb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2631,11 +2631,8 @@ pricedb_foreach_pricelist(gpointer key, gpointer val, gpointer user_data)
GNCPriceDBForeachData *foreach_data = (GNCPriceDBForeachData *) user_data;

/* stop traversal when func returns FALSE */
for (auto node = price_list; foreach_data->ok && node; node = node->next)
{
GNCPrice *p = (GNCPrice *) node->data;
foreach_data->ok = foreach_data->func(p, foreach_data->user_data);
}
foreach_data->ok = g_list_find_custom (price_list, foreach_data->user_data, (GCompareFunc)foreach_data->func) ?
true : false;
}

static void
Expand Down

0 comments on commit 5968e32

Please sign in to comment.