Skip to content

tree-store: Simplify gtk_tree_store_clear_traverse

GtkTreeStore's clear method uses a recursive helper, gtk_tree_store_clear_traverse(), to do the actual clearing. A comment states that it was ripped off from g_node_traverse_post_order(), but it kept some unnecessary logic from that source. In particular, it returned a gboolean value, which was always (although not immediately obviously) FALSE.

This commit removes the return value and eliminates an unnecessary branch in the code.

Edited by Peter Bloomfield

Merge request reports