diff options
author | Matthias Maennich <maennich@google.com> | 2021-09-03 00:33:26 +0100 |
---|---|---|
committer | lberki <lberki@users.noreply.github.com> | 2021-09-06 15:09:55 +0200 |
commit | 9c4d6d4d9bbe2e70e5b5c080e72f00b5eb4b094e (patch) | |
tree | 42de85ad1ba46349ddd250d9eb1ba6b81523116d /src | |
parent | 6f8c8f262a01d7169c6bea723f74756d2f7b941c (diff) | |
download | kati-9c4d6d4d9bbe2e70e5b5c080e72f00b5eb4b094e.tar.gz |
Exec: do not heap allocate the Executor
Stack is just fine.
Signed-off-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/exec.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/exec.cc b/src/exec.cc index 6560301..37ffc12 100644 --- a/src/exec.cc +++ b/src/exec.cc @@ -140,11 +140,11 @@ class Executor { } // namespace void Exec(const vector<NamedDepNode>& roots, Evaluator* ev) { - unique_ptr<Executor> executor(new Executor(ev)); + Executor executor(ev); for (auto const& root : roots) { - executor->ExecNode(root.second, NULL); + executor.ExecNode(root.second, NULL); } - if (executor->Count() == 0) { + if (executor.Count() == 0) { for (auto const& root : roots) { printf("kati: Nothing to be done for `%s'.\n", root.first.c_str()); } |