aboutsummaryrefslogtreecommitdiffstats
path: root/src/MessageCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-03 11:31:32 +0100
committerMax Kellermann <max@duempel.org>2013-01-03 17:49:47 +0100
commitd919f8d50ab32a94b8965330297985cd14c45a42 (patch)
tree238445dc46c7206af0859b3f075f9bd0a4026648 /src/MessageCommands.cxx
parentd67aa7c19dfaf5c39b49dc8dfc486b4e99f31db1 (diff)
downloadmpd-d919f8d50ab32a94b8965330297985cd14c45a42.tar.gz
mpd-d919f8d50ab32a94b8965330297985cd14c45a42.tar.xz
mpd-d919f8d50ab32a94b8965330297985cd14c45a42.zip
ClientInternal: use std::set for subscriptions
Diffstat (limited to '')
-rw-r--r--src/MessageCommands.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/MessageCommands.cxx b/src/MessageCommands.cxx
index 5be179027..6ac5912e7 100644
--- a/src/MessageCommands.cxx
+++ b/src/MessageCommands.cxx
@@ -83,12 +83,8 @@ collect_channels(gpointer data, gpointer user_data)
(struct channels_context *)user_data;
const Client *client = (const Client *)data;
- for (GSList *i = client->subscriptions; i != NULL;
- i = g_slist_next(i)) {
- const char *channel = (const char *)i->data;
-
- context->channels.insert(channel);
- }
+ context->channels.insert(client->subscriptions.begin(),
+ client->subscriptions.end());
}
enum command_return