From 3364c1b8939aaf2f758a9396d0b73298042516d9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Jun 2014 18:57:30 +0200 Subject: ClientList: use class boost::intrusive::list Eliminate extra allocations for the std::list node instances. --- src/command/MessageCommands.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/command') 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 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) -- cgit v1.2.3