mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
[libcalamares] Reduce copying and warnings
This commit is contained in:
parent
5279e78c9f
commit
2777b5dd30
2 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue