From 6c197bbd2e6fb24a3736866d328859efa204946a Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Sun, 30 Apr 2023 19:20:20 -0400 Subject: [PATCH] Fix shadowing Signed-off-by: Eric Berquist --- avogadro/qtplugins/scriptcharges/scriptchargemodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/avogadro/qtplugins/scriptcharges/scriptchargemodel.cpp b/avogadro/qtplugins/scriptcharges/scriptchargemodel.cpp index 726a7793a2..2c789616d0 100644 --- a/avogadro/qtplugins/scriptcharges/scriptchargemodel.cpp +++ b/avogadro/qtplugins/scriptcharges/scriptchargemodel.cpp @@ -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; @@ -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;