X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_DataModelReader.cpp;h=55bb37612687ba80302a194544ff59a4d1befe6b;hb=80504d617ac031826f8cbf0e83b8876bf3d8caff;hp=68e6f6dcd937eec1afd21df98472752cef3dde3a;hpb=9b61e5ee5eafe9d6948d9a78667efa2abec132c3;p=modules%2Fshaper.git diff --git a/src/Config/Config_DataModelReader.cpp b/src/Config/Config_DataModelReader.cpp index 68e6f6dcd..55bb37612 100644 --- a/src/Config/Config_DataModelReader.cpp +++ b/src/Config/Config_DataModelReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 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 @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "Config_DataModelReader.h" @@ -24,6 +23,8 @@ #include +#include + // used only for GUI xml data reading // LCOV_EXCL_START Config_DataModelReader::Config_DataModelReader() @@ -47,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) { @@ -73,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; } }