diff --git a/src/client/QXmppMixManager.cpp b/src/client/QXmppMixManager.cpp index 31be50e14..0a94d1927 100644 --- a/src/client/QXmppMixManager.cpp +++ b/src/client/QXmppMixManager.cpp @@ -373,10 +373,10 @@ QXmppTask QXmppMixManager::requestChannelNod return std::move(*error); } else { const auto &items = std::get>(result); - QVector nodes; + QVector nodes(items.size()); - std::for_each(items.cbegin(), items.cend(), [&nodes](const QXmppDiscoveryIq::Item &item) { - nodes.append(item.node()); + std::transform(items.cbegin(), items.cend(), nodes.begin(), [](const QXmppDiscoveryIq::Item &item) { + return item.node(); }); return std::move(QXmppMixIq::listToNodes(nodes));