Avoid unnecessary copy of the variable 'pair' in WifiConfigDialog::rescan_networks().

This commit is contained in:
Lukáš Hejl 2024-01-04 15:00:47 +01:00
parent 69b29a202f
commit a98b97643e

View File

@ -192,7 +192,7 @@ void WifiConfigDialog::rescan_networks(bool select)
std::string current = m_wifi_scanner->get_current_ssid();
const auto& map = m_wifi_scanner->get_map();
m_ssid_combo->Clear();
for (const auto pair : map) {
for (const auto &pair : map) {
m_ssid_combo->Append(pair.first);
// select ssid of current network (if connected)
if (current == pair.first)