@@ -76,7 +76,7 @@ AddInstrumentDialog::AddInstrumentDialog(
7676 if (!driver.empty ())
7777 {
7878 int i = 0 ;
79- for (auto driverName: m_drivers)
79+ for (auto & driverName : m_drivers)
8080 {
8181 if (driverName == driver)
8282 {
@@ -92,7 +92,7 @@ AddInstrumentDialog::AddInstrumentDialog(
9292 if (!transport.empty ())
9393 {
9494 int i = 0 ;
95- for (auto transportName: m_transports)
95+ for (auto & transportName : m_transports)
9696 {
9797 if (transportName == transport)
9898 {
@@ -325,7 +325,7 @@ void AddInstrumentDialog::UpdateCombos()
325325 int modelIndex = 0 ;
326326 auto selectedModel = supportedModels[0 ];
327327 // Model list
328- for (auto model : supportedModels)
328+ for (auto & model : supportedModels)
329329 {
330330 m_models.push_back (model.modelName );
331331 if (modelIndex == m_selectedModel)
@@ -343,7 +343,7 @@ void AddInstrumentDialog::UpdateCombos()
343343
344344 // Transport list
345345 int transportIndex = 0 ;
346- for (auto transport : selectedModel.supportedTransports )
346+ for (auto & transport : selectedModel.supportedTransports )
347347 {
348348 string transportName = to_string (transport.transportType );
349349 // Prepare transport type for default value
@@ -372,7 +372,7 @@ void AddInstrumentDialog::UpdateCombos()
372372 // Update endpoint list
373373 auto endpoints = SCPITransport::EnumEndpoints (m_transports[m_selectedTransport]);
374374 int endpointIndex = 0 ;
375- for (auto endpoint : endpoints)
375+ for (auto & endpoint : endpoints)
376376 {
377377 m_endpoints.push_back (endpoint);
378378 m_endpointNames.push_back (endpoint.path + " (" + endpoint.description +" )" );
0 commit comments