X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FConfig%2FConfig_DataModelReader.cpp;h=8f88ec7f15c3d6ed098dd1e63ca30e5c539ed5ba;hb=aba714fbb23139b15272ed816c9a30595165106c;hp=bba44d440edf4e1e544b506b08debe836ddce8e8;hpb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;p=modules%2Fshaper.git diff --git a/src/Config/Config_DataModelReader.cpp b/src/Config/Config_DataModelReader.cpp index bba44d440..8f88ec7f1 100644 --- a/src/Config/Config_DataModelReader.cpp +++ b/src/Config/Config_DataModelReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2021 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,6 +23,8 @@ #include +#include + // used only for GUI xml data reading // LCOV_EXCL_START Config_DataModelReader::Config_DataModelReader() @@ -46,10 +48,9 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode) std::string aIcon = getProperty(theNode, NODE_ICON); std::string aEmpty = getProperty(theNode, SHOW_EMPTY); std::string aFeatures = getProperty(theNode, FOLDER_FEATURES); - std::string::iterator aIt; - for (aIt = aEmpty.begin(); aIt != aEmpty.end(); aIt++) { - (*aIt) = toupper(*aIt); - } + + std::transform(aEmpty.begin(), aEmpty.end(), aEmpty.begin(), + [](char c) { return static_cast(::toupper(c)); }); bool aIsEmpty = (aEmpty == "FALSE")? false : true; if (isRootReading) { @@ -72,10 +73,8 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode) isRootReading = false; mySubTypes = getProperty(theNode, GROUP_TYPE); std::string isResult = getProperty(theNode, LINK_ITEM); - std::string::iterator aIt; - for (aIt = isResult.begin(); aIt != isResult.end(); aIt++) { - (*aIt) = toupper(*aIt); - } + std::transform(isResult.begin(), isResult.end(), isResult.begin(), + [](char c) { return static_cast(::toupper(c)); }); myIsResultLink = (isResult == "TRUE")? true : false; } }