Skip to content

Commit

Permalink
Fix shadowing
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Berquist <[email protected]>
  • Loading branch information
berquist committed May 1, 2023
1 parent ed2cdf6 commit 6c197bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions avogadro/qtplugins/scriptcharges/scriptchargemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ void ScriptChargeModel::processElementString(const QString& str)
str2.replace(',', ' ');
// then split on whitespace
QStringList strList = str2.split(QRegExp("\\s+"), QString::SkipEmptyParts);
foreach (QString str, strList) {
foreach (QString sstr, strList) {
// these should be numbers or ranges (e.g., 1-84)
if (str.contains('-')) {
if (sstr.contains('-')) {
// range, so split on the dash
QStringList strList2 = str.split('-');
QStringList strList2 = sstr.split('-');
if (strList2.size() != 2)
return;

Expand All @@ -379,7 +379,7 @@ void ScriptChargeModel::processElementString(const QString& str)
}

bool ok;
int i = str.toInt(&ok);
int i = sstr.toInt(&ok);
if (!ok || i < 1 || i > 119)
return;

Expand Down

0 comments on commit 6c197bb

Please sign in to comment.