Avoid shadowing warning, and simplify using transform().

Minor detail: will use ::toupper() rather than std::toupper() overloads,
only a problem if underlying character type of string type changes.
This commit is contained in:
Atgeirr Flø Rasmussen 2016-12-30 10:06:11 +01:00
parent 818e0d6faa
commit f7ef4c9724

View File

@ -124,9 +124,8 @@ public:
rawCaseName = baseName.substr(0, i);
// transform the result to ALL_UPPERCASE
caseName_ = "";
for (size_t i = 0; i < rawCaseName.size(); ++i)
caseName_ += std::toupper(rawCaseName[i]);
caseName_ = rawCaseName;
std::transform(caseName_.begin(), caseName_.end(), caseName_.begin(), ::toupper);
if (myRank == 0)
std::cout << "Reading the deck file '" << fileName << "'" << std::endl;