[libcalamares] Reduce copying and warnings

main
Adriaan de Groot 6 years ago
parent 5279e78c9f
commit 2777b5dd30

@ -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;

@ -72,7 +72,7 @@ public:
NamedSuffix( const NamedEnumTable<T>& 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();

Loading…
Cancel
Save