changed: use internal function to uppercase string

This commit is contained in:
Arne Morten Kvarving committed 2020-02-19 11:20:16 +01:00
1 parent 4ba7d3a7bc
commit e262cf8d51
2 files changed
+9 -6

No files matched your search

+5 -3
View File
@@ -40,6 +40,8 @@
#include <opm/common/OpmLog/LogUtil.hpp>
#endif
#include <opm/parser/eclipse/Utility/String.hpp>
BEGIN_PROPERTIES
// forward declaration of property tags
@@ -93,11 +95,11 @@ static FileOutputMode setupLogging(int mpi_rank_, const std::string& deck_filena
std::ostringstream logFileStream;
// Strip extension "." or ".DATA"
std::string extension = boost::to_upper_copy(fpath.extension().string());
std::string extension = uppercase(fpath.extension().string());
if (extension == ".DATA" || extension == ".") {
baseName = boost::to_upper_copy(fpath.stem().string());
baseName = uppercase(fpath.stem().string());
} else {
baseName = boost::to_upper_copy(fpath.filename().string());
baseName = uppercase(fpath.filename().string());
}
std::string output_dir = cmdline_output_dir;
+4 -3
View File
@@ -41,6 +41,7 @@
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
#include <opm/parser/eclipse/Utility/String.hpp>
#if HAVE_DUNE_FEM
#include <dune/fem/misc/mpimanager.hh>
@@ -369,14 +370,14 @@ namespace Opm
fs::path deck_filename(EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName));
std::string basename;
// Strip extension "." and ".DATA"
std::string extension = boost::to_upper_copy(deck_filename.extension().string());
std::string extension = uppercase(deck_filename.extension().string());
if ( extension == ".DATA" || extension == "." )
{
basename = boost::to_upper_copy(deck_filename.stem().string());
basename = uppercase(deck_filename.stem().string());
}
else
{
basename = boost::to_upper_copy(deck_filename.filename().string());
basename = uppercase(deck_filename.filename().string());
}
std::for_each(fs::directory_iterator(output_path),
fs::directory_iterator(),