From 1e1758e8c30d30df0ebeefbada1e5a8f74d8a350 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 11 Jul 2024 13:22:16 +0200 Subject: Use static Create functions to construct ArtifactDescription ...instead of unobvious ctors relying on overload resolution. --- src/buildtool/execution_engine/dag/dag.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/buildtool/execution_engine/dag/dag.cpp') diff --git a/src/buildtool/execution_engine/dag/dag.cpp b/src/buildtool/execution_engine/dag/dag.cpp index a3c25402..c36ec664 100644 --- a/src/buildtool/execution_engine/dag/dag.cpp +++ b/src/buildtool/execution_engine/dag/dag.cpp @@ -22,7 +22,7 @@ auto DependencyGraph::CreateOutputArtifactNodes( -> std::pair, std::vector> { if (is_tree_action) { // create tree artifact - auto artifact = ArtifactDescription{action_id}.ToArtifact(); + auto artifact = ArtifactDescription::CreateTree(action_id).ToArtifact(); auto const node_id = AddArtifact(std::move(artifact)); return std::make_pair(std::vector{}, std::vector{ @@ -32,10 +32,9 @@ auto DependencyGraph::CreateOutputArtifactNodes( // create action artifacts auto node_creator = [this, &action_id](auto* nodes, auto const& paths) { for (auto const& artifact_path : paths) { - auto artifact = - ArtifactDescription{action_id, - std::filesystem::path{artifact_path}} - .ToArtifact(); + auto artifact = ArtifactDescription::CreateAction( + action_id, std::filesystem::path{artifact_path}) + .ToArtifact(); auto const node_id = AddArtifact(std::move(artifact)); nodes->emplace_back(NamedArtifactNodePtr{ artifact_path, &(*artifact_nodes_[node_id])}); -- cgit v1.2.3