From 601af4e8adac4cdd57a031db5d073f61fc1033dc Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 5 Feb 2025 21:56:04 +0100 Subject: solver3: Refactor Dump() to toString() This vastly simplifies the code at the expense of performance, lol. --- apt-pkg/solver3.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apt-pkg/solver3.h') diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index 118ea5e28..fc68a5cef 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -317,8 +317,7 @@ struct APT::Solver::Clause inline Clause(Var reason, Group group, bool optional = false, bool negative = false) : reason(reason), group(group), optional(optional), negative(negative) {} - // \brief Dump the clause to std::cerr - void Dump(pkgCache &cache); + std::string toString(pkgCache &cache); }; /** @@ -352,8 +351,7 @@ struct APT::Solver::Work bool erased{false}; bool operator<(APT::Solver::Work const &b) const; - // \brief Dump the work item to std::cerr - void Dump(pkgCache &cache); + std::string toString(pkgCache &cache); inline Work(Clause clause, depth_type depth) : clause(std::move(clause)), depth(depth) {} }; -- cgit v1.2.3-70-g09d2