diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-06 11:28:07 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-07 20:59:43 +0100 |
| commit | ecb1399ca5f4917286d354b00dadb91c8075db1d (patch) | |
| tree | 1c93f36c0127c6155d9d4a234e65af0299f40747 /apt-pkg/solver3.h | |
| parent | 3d5f8042c64c30497a65e522c6e402eb4bab10c3 (diff) | |
solver3: Point to stored clauses, do not copy them
This makes Work trivially destructible, and in turn solved, allowing
their queues to be destructed without running destructors, and avoiding
the copy should have a nice performance improvement.
Diffstat (limited to 'apt-pkg/solver3.h')
| -rw-r--r-- | apt-pkg/solver3.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index d3e22eaba..bbe3f3d56 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -334,7 +334,7 @@ struct APT::Solver::Clause */ struct APT::Solver::Work { - Clause clause; + Clause *clause; // \brief The depth at which the item has been added depth_type depth; @@ -354,7 +354,7 @@ struct APT::Solver::Work bool operator<(APT::Solver::Work const &b) const; std::string toString(pkgCache &cache); - inline Work(Clause clause, depth_type depth) : clause(std::move(clause)), depth(depth) {} + inline Work(Clause *clause, depth_type depth) : clause(clause), depth(depth) {} }; // \brief This essentially describes the install state in RFC2119 terms. |
