Merge branch 'struc' of git://github.com/neheb/MPD

This commit is contained in:
Max Kellermann
2021-03-04 17:50:53 +01:00
15 changed files with 49 additions and 61 deletions

View File

@@ -34,8 +34,7 @@ Client::Subscribe(const char *channel) noexcept
if (num_subscriptions >= MAX_SUBSCRIPTIONS)
return Client::SubscribeResult::FULL;
auto r = subscriptions.insert(channel);
if (!r.second)
if (!subscriptions.insert(channel).second)
return Client::SubscribeResult::ALREADY;
++num_subscriptions;