diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-02-28 13:24:26 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-03-01 10:46:54 +0100 |
commit | 1ef03a1c7043d617885d319b0803d69907c3c9cc (patch) | |
tree | acfcd33dab8e2355863356af88d14ac6e3578b2d /src/buildtool/execution_engine/dag/dag.cpp | |
parent | fffee539ec37e9e68189e71994aa2c901d30c9fb (diff) | |
download | justbuild-1ef03a1c7043d617885d319b0803d69907c3c9cc.tar.gz |
Pass actions and trees in analysis result as shared pointer
... to avoid unnecessary copying and moving of larger objects.
Diffstat (limited to 'src/buildtool/execution_engine/dag/dag.cpp')
-rw-r--r-- | src/buildtool/execution_engine/dag/dag.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<ActionDescription> const& actions) return true; } +auto DependencyGraph::Add(std::vector<ActionDescription::Ptr> 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(); |