@@ -19,7 +19,7 @@ void EELParser::loadFile(QString path)
1919 // Parse number range parameters
2020 {
2121 QRegularExpression descRe (R"( (?<var>\w+):(?<def>-?\d+\.?\d*)?<(?<min>-?\d+\.?\d*),(?<max>-?\d+\.?\d*),?(?<step>-?\d+\.?\d*)?>(?<desc>[\s\S][^\n]*))" );
22- for (auto line : container.code .split (" \n " ))
22+ for (const auto & line : container.code .split (" \n " ))
2323 {
2424 auto matchIterator = descRe.globalMatch (line);
2525
@@ -77,7 +77,7 @@ bool EELParser::loadDefaults()
7777 return false ;
7878 }
7979
80- for (const auto & prop : properties)
80+ for (const auto & prop : qAsConst ( properties) )
8181 {
8282 if (prop->getType () == EELPropertyType::NumberRange)
8383 {
@@ -96,7 +96,7 @@ bool EELParser::hasDefaultsDefined()
9696 return false ;
9797 }
9898
99- for (const auto & prop : properties)
99+ for (const auto & prop : qAsConst ( properties) )
100100 {
101101 if (prop->getType () == EELPropertyType::NumberRange)
102102 {
@@ -116,7 +116,7 @@ bool EELParser::canLoadDefaults()
116116 return false ;
117117 }
118118
119- for (auto * prop : properties)
119+ for (auto * prop : qAsConst ( properties) )
120120 {
121121 if (prop->getType () == EELPropertyType::NumberRange)
122122 {
@@ -146,7 +146,7 @@ QString EELParser::getDescription()
146146{
147147 QRegularExpression descRe (R"( (?:^|(?<=\n))(?:desc:)([\s\S][^\n]*))" );
148148
149- for (auto line : container.code .split (" \n " ))
149+ for (const auto & line : container.code .split (" \n " ))
150150 {
151151 auto matchIterator = descRe.globalMatch (line);
152152
@@ -198,7 +198,7 @@ QString EELParser::findVariable(QString key,
198198 {
199199 QRegularExpression re (QString (R"( %1\s*=\s*(?<val>-?\d+\.?\d*)\s*;)" ).arg (key));
200200
201- for (auto line : container.code .split (" \n " ))
201+ for (const auto & line : container.code .split (" \n " ))
202202 {
203203 auto matchIterator = re.globalMatch (line);
204204
0 commit comments