- std::string s = "";
- for (StringMap::iterator it = m_ips.begin(); it != m_ips.end(); ++it) {
- if (it->first == ip_or_name || it->second == ip_or_name
- || ip_or_name == "") {
- s += it->first + "|" + it->second + ", ";
+ std::string s;
+ for (const auto &ip : m_ips) {
+ if (ip.first == ip_or_name || ip.second == ip_or_name
+ || ip_or_name.empty()) {
+ s += ip.first + "|" + ip.second + ", ";