Optimize array iterations in the History panel
This commit is contained in:
parent
d14b65563a
commit
09af4e6754
1 changed files with 4 additions and 8 deletions
|
@ -441,7 +441,8 @@ midori_history_insert_item (MidoriHistory* history,
|
||||||
{
|
{
|
||||||
GtkTreeIter* piter;
|
GtkTreeIter* piter;
|
||||||
gint64 pday;
|
gint64 pday;
|
||||||
guint i, n;
|
guint i;
|
||||||
|
KatzeItem* child;
|
||||||
|
|
||||||
g_signal_connect (item, "add-item",
|
g_signal_connect (item, "add-item",
|
||||||
G_CALLBACK (midori_history_add_item_cb), history);
|
G_CALLBACK (midori_history_add_item_cb), history);
|
||||||
|
@ -459,14 +460,9 @@ midori_history_insert_item (MidoriHistory* history,
|
||||||
g_object_unref (item);
|
g_object_unref (item);
|
||||||
piter = &iter;
|
piter = &iter;
|
||||||
}
|
}
|
||||||
n = katze_array_get_length (KATZE_ARRAY (item));
|
i = 0;
|
||||||
for (i = 0; i < n; i++)
|
while ((child = katze_array_get_nth_item (KATZE_ARRAY (item), i++)))
|
||||||
{
|
|
||||||
KatzeItem* child;
|
|
||||||
|
|
||||||
child = katze_array_get_nth_item (KATZE_ARRAY (item), i);
|
|
||||||
midori_history_insert_item (history, treestore, piter, child, day);
|
midori_history_insert_item (history, treestore, piter, child, day);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue