From fef009f792e8fbc06a5e302b492c236e79fb1aca Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 11 Jan 2023 15:16:07 +0100 Subject: [PATCH] Main: remove unused method and associated filesystem include --- opm/simulators/flow/Main.hpp | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/opm/simulators/flow/Main.hpp b/opm/simulators/flow/Main.hpp index 8dbe16b92..1f067981b 100644 --- a/opm/simulators/flow/Main.hpp +++ b/opm/simulators/flow/Main.hpp @@ -77,7 +77,6 @@ #include #include -#include #include #include #include @@ -539,34 +538,6 @@ private: return true; } - std::filesystem::path simulationCaseName_(const std::string& casename) - { - namespace fs = ::std::filesystem; - - auto exists = [](const fs::path& f) - { - return (fs::exists(f) && fs::is_regular_file(f)) - || (fs::is_symlink(f) && - fs::is_regular_file(fs::read_symlink(f))); - }; - - auto simcase = fs::path { casename }; - - if (exists(simcase)) { - return simcase; - } - - for (const auto& ext : { std::string("DATA"), std::string("data") }) { - if (exists(simcase.replace_extension(ext))) { - return simcase; - } - } - - throw std::invalid_argument { - "Cannot find input case '" + casename + '\'' - }; - } - // This function is an extreme special case, if the program has been invoked // *exactly* as: //