From bd410a2557b6127d47396cd0740347e4af0766df Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 17 Dec 2024 16:51:12 +0100 Subject: Remove FileRoot::ComputedRoot --- src/other_tools/utils/TARGETS | 2 +- src/other_tools/utils/parse_computed_root.cpp | 14 +++++++------- src/other_tools/utils/parse_computed_root.hpp | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'src/other_tools/utils') diff --git a/src/other_tools/utils/TARGETS b/src/other_tools/utils/TARGETS index efeb5494..8e1803b9 100644 --- a/src/other_tools/utils/TARGETS +++ b/src/other_tools/utils/TARGETS @@ -103,7 +103,7 @@ , "deps": [ ["@", "gsl", "", "gsl"] , ["src/buildtool/build_engine/expression", "expression_ptr_interface"] - , ["src/buildtool/file_system", "file_root"] + , ["src/buildtool/file_system", "precomputed_root"] , ["src/utils/cpp", "expected"] ] , "private-deps": diff --git a/src/other_tools/utils/parse_computed_root.cpp b/src/other_tools/utils/parse_computed_root.cpp index ccc01d92..540f43c0 100644 --- a/src/other_tools/utils/parse_computed_root.cpp +++ b/src/other_tools/utils/parse_computed_root.cpp @@ -50,7 +50,7 @@ auto ComputedRootParser::GetTargetRepository() const } auto ComputedRootParser::GetResult() const - -> expected { + -> expected { auto const repo = GetTargetRepository(); if (not repo) { return unexpected{repo.error()}; @@ -77,10 +77,10 @@ auto ComputedRootParser::GetResult() const return unexpected{fmt::format("Unsupported value {} for key \"config\"", config->ToString())}; } - return FileRoot::ComputedRoot{.repository = *repo, - .target_module = target_module->String(), - .target_name = target_module->String(), - .config = config.IsNotNull() - ? config->ToJson() - : nlohmann::json::object()}; + return ComputedRoot{.repository = *repo, + .target_module = target_module->String(), + .target_name = target_module->String(), + .config = config.IsNotNull() + ? config->ToJson() + : nlohmann::json::object()}; } diff --git a/src/other_tools/utils/parse_computed_root.hpp b/src/other_tools/utils/parse_computed_root.hpp index e23284da..2cc54c87 100644 --- a/src/other_tools/utils/parse_computed_root.hpp +++ b/src/other_tools/utils/parse_computed_root.hpp @@ -20,7 +20,7 @@ #include "gsl/gsl" #include "src/buildtool/build_engine/expression/expression_ptr.hpp" -#include "src/buildtool/file_system/file_root.hpp" +#include "src/buildtool/file_system/precomputed_root.hpp" #include "src/utils/cpp/expected.hpp" class ComputedRootParser final { @@ -36,8 +36,7 @@ class ComputedRootParser final { [[nodiscard]] auto GetTargetRepository() const -> expected; - [[nodiscard]] auto GetResult() const - -> expected; + [[nodiscard]] auto GetResult() const -> expected; private: ExpressionPtr const& repository_; -- cgit v1.2.3