aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-10 18:57:30 +0200
committerMax Kellermann <max@duempel.org>2014-06-11 09:27:17 +0200
commit3364c1b8939aaf2f758a9396d0b73298042516d9 (patch)
tree046eb528b1e79d8c4bcd55e9939d58bde9981c21 /src/command
parent0801b3f495aac982bc7d009d7ae81d8e3041db0c (diff)
downloadmpd-3364c1b8939aaf2f758a9396d0b73298042516d9.tar.gz
mpd-3364c1b8939aaf2f758a9396d0b73298042516d9.tar.xz
mpd-3364c1b8939aaf2f758a9396d0b73298042516d9.zip
ClientList: use class boost::intrusive::list
Eliminate extra allocations for the std::list node instances.
Diffstat (limited to '')
-rw-r--r--src/command/MessageCommands.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/MessageCommands.cxx b/src/command/MessageCommands.cxx
index fe7500aaf..02b251b9a 100644
--- a/src/command/MessageCommands.cxx
+++ b/src/command/MessageCommands.cxx
@@ -82,8 +82,8 @@ handle_channels(Client &client,
std::set<std::string> channels;
for (const auto &c : *client.partition.instance.client_list)
- channels.insert(c->subscriptions.begin(),
- c->subscriptions.end());
+ channels.insert(c.subscriptions.begin(),
+ c.subscriptions.end());
for (const auto &channel : channels)
client_printf(client, "channel: %s\n", channel.c_str());
@@ -122,8 +122,8 @@ handle_send_message(Client &client,
bool sent = false;
const ClientMessage msg(argv[1], argv[2]);
- for (const auto &c : *client.partition.instance.client_list)
- if (c->PushMessage(msg))
+ for (auto &c : *client.partition.instance.client_list)
+ if (c.PushMessage(msg))
sent = true;
if (sent)