summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-05-26 15:06:54 +0000
committerJulian Andres Klode <jak@debian.org>2025-05-26 15:06:54 +0000
commit88adaff17023b0c916fc3227dc25d0b95128d7f0 (patch)
treefbca1f0044f1f8f40235b18fa1e9a971861403d7 /apt-pkg/solver3.h
parentc6f49402c2f8aed20b538263d80ecb6fed179b18 (diff)
parent717ca7922be8a025b8034dc840b2ad9befc3b171 (diff)
Merge branch 'solver3' into 'main'
solver3: Remove Work::choice See merge request apt-team/apt!484
Diffstat (limited to 'apt-pkg/solver3.h')
-rw-r--r--apt-pkg/solver3.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index 43f6ec3a7..590b187cc 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -222,7 +222,7 @@ class Solver
std::vector<depth_type> choices{};
// \brief The time we called Solve()
- time_t startTime;
+ time_t startTime{};
EDSP::Request::Flags requestFlags;
/// Various configuration options
@@ -277,7 +277,7 @@ class Solver
public:
// \brief Create a new decision level.
- void Push(Work work);
+ void Push(Var var, Work work);
// \brief Revert to the previous decision level.
[[nodiscard]] bool Pop();
// \brief Undo a single assignment / solved work item
@@ -426,15 +426,8 @@ struct APT::Solver::Work
// \brief The depth at which the item has been added
depth_type depth;
- // This is a union because we only need to store the choice we made when adding
- // to the choice vector, and we don't need the size of valid choices in there.
- union
- {
- // The choice we took
- Var choice;
- // Number of valid choices
- size_t size{0};
- };
+ // Number of valid choices
+ size_t size{0};
// \brief This item should be removed from the queue.
bool erased{false};