From 6f685784ecef342b42bda170a70c3776c814b461 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 6 Dec 2023 11:08:42 -0500 Subject: [PATCH] use new str::upper() overloads from CODA-OSS --- six/modules/c++/cphd03/source/CPHDXMLControl.cpp | 3 +-- six/modules/c++/samples/check_valid_six.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/six/modules/c++/cphd03/source/CPHDXMLControl.cpp b/six/modules/c++/cphd03/source/CPHDXMLControl.cpp index 38d3d35bc..1bda52ef8 100644 --- a/six/modules/c++/cphd03/source/CPHDXMLControl.cpp +++ b/six/modules/c++/cphd03/source/CPHDXMLControl.cpp @@ -778,8 +778,7 @@ void CPHDXMLControl::fromXML(const xml::lite::Element* srpXML, SRP& srp) #if ENFORCESPEC srp.srpType = cphd::SRPType(getFirstAndOnly(srpXML, "SRPType")->getCharacterData()); #else - std::string s(getFirstAndOnly(srpXML, "SRPType")->getCharacterData()); - str::upper(s); + const auto s = str::upper(getFirstAndOnly(srpXML, "SRPType")->getCharacterData()); srp.srpType = cphd::SRPType::toType(s); #endif parseInt(getFirstAndOnly(srpXML, "NumSRPs"), srp.numSRPs); diff --git a/six/modules/c++/samples/check_valid_six.cpp b/six/modules/c++/samples/check_valid_six.cpp index c1f7e6ea4..2f4bac8c6 100644 --- a/six/modules/c++/samples/check_valid_six.cpp +++ b/six/modules/c++/samples/check_valid_six.cpp @@ -189,7 +189,7 @@ static int main_(int argc, char** argv) const std::string inputPath(options->get("input")); std::vector inputPathnames = getPathnames(inputPath); const std::string logFile(options->get("log")); - std::string level(options->get("level")); + auto level = str::upper(options->get("level")); std::vector schemaPaths; getSchemaPaths(*options, "--schema", "schema", schemaPaths); @@ -200,7 +200,6 @@ static int main_(int argc, char** argv) xmlRegistry.addCreator(); xmlRegistry.addCreator(); - str::upper(level); str::trim(level); std::unique_ptr log = logging::setupLogger(fs::path(argv[0]).filename().string(), level, logFile);