# HG changeset patch # User Richard Laager # Date 1130448622 0 # Node ID 2bee8d023e231d52225e4567a8737060b32bfa78 # Parent ccd53adabf6c3cfa65ee52fa98575c7e7f63c577 [gaim-migrate @ 14157] A list optimization I missed before. committer: Tailor Script diff -r ccd53adabf6c -r 2bee8d023e23 src/conversation.c --- a/src/conversation.c Thu Oct 27 21:21:55 2005 +0000 +++ b/src/conversation.c Thu Oct 27 21:30:22 2005 +0000 @@ -1488,7 +1488,8 @@ cb = gaim_conv_chat_cb_new(user, flags); gaim_conv_chat_set_users(chat, g_list_prepend(gaim_conv_chat_get_users(chat), cb)); - aliases = g_list_append(aliases, (char *)alias); + /* We reverse this later to keep it in the same order as users. */ + aliases = g_list_prepend(aliases, (char *)alias); if (!quiet && new_arrivals) { char *tmp; @@ -1511,6 +1512,10 @@ extra_msgs = extra_msgs->next; } + /* This needs to be in the same order as users, but it's faster + * to prepend, so we do that above. */ + aliases = g_list_reverse(aliases); + if (ops != NULL && ops->chat_add_users != NULL) ops->chat_add_users(conv, users, aliases);