FairMQChannel: avoid copy when iterating over endpoints

This commit is contained in:
Alexey Rybalchenko 2020-09-22 11:34:52 +02:00 committed by Dennis Klein
parent d03a504ccd
commit 120760da0a

View File

@ -381,7 +381,7 @@ try {
} else {
vector<string> endpoints;
boost::algorithm::split(endpoints, fAddress, boost::algorithm::is_any_of(";"));
for (const auto endpoint : endpoints) {
for (const auto& endpoint : endpoints) {
string address;
if (endpoint[0] == '@' || endpoint[0] == '+' || endpoint[0] == '>') {
address = endpoint.substr(1);