From 1ef03a1c7043d617885d319b0803d69907c3c9cc Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 28 Feb 2022 13:24:26 +0100 Subject: Pass actions and trees in analysis result as shared pointer ... to avoid unnecessary copying and moving of larger objects. --- src/buildtool/execution_engine/dag/dag.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 96a74650..5d60dd01 100644 --- a/src/buildtool/execution_engine/dag/dag.cpp +++ b/src/buildtool/execution_engine/dag/dag.cpp @@ -104,6 +104,16 @@ auto DependencyGraph::Add(std::vector const& actions) return true; } +auto DependencyGraph::Add(std::vector const& actions) + -> bool { + for (auto const& action : actions) { + if (not AddAction(*action)) { + return false; + } + } + return true; +} + auto DependencyGraph::AddArtifact(ArtifactDescription const& description) -> ArtifactIdentifier { auto artifact = description.ToArtifact(); -- cgit v1.2.3