aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-05-28 05:07:12 +0800
committerChristian Persch <chpe@src.gnome.org>2003-05-28 05:07:12 +0800
commit042b7d8e719fe040d56e9d3705986dbda1b265f4 (patch)
tree685dfb80f3894a9ee0fc64c34743eaec7d5320fa
parent06cdf72ccc3d448d86c0ace29d74c06376572ecf (diff)
downloadgsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.tar
gsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.tar.gz
gsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.tar.bz2
gsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.tar.lz
gsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.tar.xz
gsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.tar.zst
gsoc2013-epiphany-042b7d8e719fe040d56e9d3705986dbda1b265f4.zip
g_list_prepend is faster than g_list_append.
2003-05-27 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/mozilla-embed-single.cpp: (impl_get_charset_titles), (impl_get_charset_groups), (impl_get_font_list): g_list_prepend is faster than g_list_append.
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp14
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 55052a1b2..5cab161b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-27 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/mozilla-embed-single.cpp: (impl_get_charset_titles),
+ (impl_get_charset_groups), (impl_get_font_list):
+
+ g_list_prepend is faster than g_list_append.
+
2003-05-27 Xan Lopez <xan@masilla.org>
* lib/widgets/ephy-node-view.c: (ephy_node_view_get_selection):
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index c0db1d3c5..168b9262b 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -743,11 +743,11 @@ impl_get_charset_titles (EphyEmbedSingle *shell,
info = g_new0 (CharsetInfo, 1);
info->name = charset_trans_array[j].charset_name;
info->title = charset_trans_array[j].charset_title;
- l = g_list_append (l, info);
+ l = g_list_prepend (l, info);
}
}
- *charsets = l;
+ *charsets = g_list_reverse (l);
return G_OK;
}
@@ -759,12 +759,12 @@ impl_get_charset_groups (EphyEmbedSingle *shell,
GList *l = NULL;
int i;
- for (i = 0; lgroups[i] != NULL; i++)
+ for (i = 0; i < n_lgroups; i++)
{
- l = g_list_append (l, (gpointer)lgroups[i]);
+ l = g_list_prepend (l, (gpointer)lgroups[i]);
}
- *groups = l;
+ *groups = g_list_reverse (l);
return G_OK;
}
@@ -803,9 +803,9 @@ impl_get_font_list (EphyEmbedSingle *shell,
char *gFontString;
gFontString = g_strdup(NS_ConvertUCS2toUTF8(fontString).get());
- l = g_list_append(l, gFontString);
+ l = g_list_prepend (l, gFontString);
}
- *fontList = l;
+ *fontList = g_list_reverse (l);
if (default_font != NULL)
{