From ae2fc9b5121e4a253d1f81fcf14bcd2afd59538c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 3 Feb 2025 17:22:31 +0100 Subject: solver3: Propagate single choice clauses as facts This removes a bunch of complexity, and generalizes the propagation behavior, such that we don't need to do if (w.solutions.size() == 1 && not w.optional) Enqueue() else AddWork(w); in our callers. --- apt-pkg/solver3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index 1e1d8a56d..548c3b777 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -180,7 +180,7 @@ class Solver // \brief Undo a single assignment / solved work item void UndoOne(); // \brief Add work to our work queue. - void AddWork(Work &&work); + [[nodiscard]] bool AddWork(Work &&work); // \brief Rescore the work after a reject or a pop void RescoreWorkIfNeeded(); -- cgit v1.2.3-70-g09d2