aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
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 /embed/mozilla/mozilla-embed-single.cpp
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.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp14
1 files changed, 7 insertions, 7 deletions
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)
{