From 6b542c8efd252463256fa96303c6414bc054db7b Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 16 May 2024 15:36:44 +0200 Subject: [PATCH] Remove unused code --- .../main/ProblemGenerationExeOptions.cpp | 22 ------------------- .../include/ProblemGenerationExeOptions.h | 3 --- .../main/include/ProblemGenerationOptions.h | 3 --- 3 files changed, 28 deletions(-) diff --git a/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp b/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp index 6cfc6f83f..b746b8278 100644 --- a/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp +++ b/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp @@ -53,28 +53,6 @@ void ProblemGenerationExeOptions::checkMandatoryOptions( } } -std::filesystem::path ProblemGenerationExeOptions::deduceArchivePathIfEmpty( - const std::filesystem::path& xpansion_output_dir, - const std::filesystem::path& archive_path) const { - if (archive_path.empty() && !xpansion_output_dir.empty()) { - if (xpansion_output_dir.string().find("-Xpansion") == std::string::npos) { - auto log_location = LOGLOCATION; - auto msg = - "Archive path is missing and output path does not contains"s - " \"-Xpansion\" suffix. Can't deduce archive file name."s; - throw MismatchedParameters(msg, log_location); - } - auto deduced_archive_path = xpansion_output_dir; - auto dir_name = deduced_archive_path.stem().string(); - dir_name = dir_name.substr(0, dir_name.find("-Xpansion"s)); - deduced_archive_path = - deduced_archive_path.replace_filename(dir_name).replace_extension( - ".zip"); - return deduced_archive_path; - } - return archive_path; -} - std::filesystem::path ProblemGenerationExeOptions::deduceXpansionDirIfEmpty( std::filesystem::path xpansion_output_dir, const std::filesystem::path& archive_path) const { diff --git a/src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h b/src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h index b24c54384..d623817f5 100644 --- a/src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h +++ b/src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h @@ -49,9 +49,6 @@ class ProblemGenerationExeOptions : public OptionsParser, [[nodiscard]] std::filesystem::path deduceXpansionDirIfEmpty( std::filesystem::path xpansion_output_dir, const std::filesystem::path& archive_path) const override; - [[nodiscard]] std::filesystem::path deduceArchivePathIfEmpty( - const std::filesystem::path& xpansion_output_dir, - const std::filesystem::path& archive_path) const override; [[nodiscard]] std::filesystem::path StudyPath() const override; void checkMandatoryOptions(const std::string& log_location) const; [[nodiscard]] auto exclusiveMandatoryParameters() const; diff --git a/src/cpp/lpnamer/main/include/ProblemGenerationOptions.h b/src/cpp/lpnamer/main/include/ProblemGenerationOptions.h index 4f3ef4637..c649f7334 100644 --- a/src/cpp/lpnamer/main/include/ProblemGenerationOptions.h +++ b/src/cpp/lpnamer/main/include/ProblemGenerationOptions.h @@ -20,9 +20,6 @@ class ProblemGenerationOptions { [[nodiscard]] virtual std::filesystem::path deduceXpansionDirIfEmpty( std::filesystem::path xpansion_output_dir, const std::filesystem::path& archive_path) const = 0; - [[nodiscard]] virtual std::filesystem::path deduceArchivePathIfEmpty( - const std::filesystem::path& xpansion_output_dir, - const std::filesystem::path& archive_path) const = 0; [[nodiscard]] virtual std::filesystem::path StudyPath() const = 0; class ConflictingParameters