diff --git a/src/libcalamares/utils/NamedEnum.h b/src/libcalamares/utils/NamedEnum.h index 047ae6f19..b4c7dcd56 100644 --- a/src/libcalamares/utils/NamedEnum.h +++ b/src/libcalamares/utils/NamedEnum.h @@ -66,7 +66,7 @@ struct NamedEnumTable { ok = false; - for ( const auto p : table ) + for ( const auto& p : table ) if ( 0 == QString::compare( s, p.first, Qt::CaseInsensitive ) ) { ok = true; @@ -87,7 +87,7 @@ struct NamedEnumTable { ok = false; - for ( const auto p : table ) + for ( const auto &p : table ) if ( s == p.second) { ok = true; diff --git a/src/libcalamares/utils/NamedSuffix.h b/src/libcalamares/utils/NamedSuffix.h index 97568d1da..d4a0ed4b7 100644 --- a/src/libcalamares/utils/NamedSuffix.h +++ b/src/libcalamares/utils/NamedSuffix.h @@ -72,7 +72,7 @@ public: NamedSuffix( const NamedEnumTable& table, const QString& s ) : NamedSuffix() { - for( const auto suffix : table.table ) + for( const auto& suffix : table.table ) if ( s.endsWith( suffix.first ) ) { m_value = s.left( s.length() - suffix.first.length() ).toInt();