diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-06 12:28:57 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-07 20:59:43 +0100 |
| commit | 8f4c09bb58b047a73328f935b9abeb4fe0b03ae1 (patch) | |
| tree | 370537ff8892f76d35d878547a64e2c2e4d8126e /apt-pkg/solver3.cc | |
| parent | ecb1399ca5f4917286d354b00dadb91c8075db1d (diff) | |
solver3: Add const where helpful
operator[] is a bit annoying here, but oh well, what can we
do?
Diffstat (limited to 'apt-pkg/solver3.cc')
| -rw-r--r-- | apt-pkg/solver3.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index f402d1ba3..36bdd9aeb 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -229,7 +229,7 @@ bool APT::Solver::Work::operator<(APT::Solver::Work const &b) const return false; } -std::string APT::Solver::Clause::toString(pkgCache &cache) +std::string APT::Solver::Clause::toString(pkgCache &cache) const { std::string out; if (auto Pkg = reason.Pkg(cache); not Pkg.end()) @@ -242,7 +242,7 @@ std::string APT::Solver::Clause::toString(pkgCache &cache) return out; } -std::string APT::Solver::Work::toString(pkgCache &cache) +std::string APT::Solver::Work::toString(pkgCache &cache) const { std::ostringstream out; if (erased) @@ -255,7 +255,7 @@ std::string APT::Solver::Work::toString(pkgCache &cache) } // Prints an implication graph part of the form A -> B -> C, possibly with "not" -std::string APT::Solver::WhyStr(Var reason) +std::string APT::Solver::WhyStr(Var reason) const { std::vector<std::string> out; @@ -997,7 +997,7 @@ bool APT::Solver::FromDepCache(pkgDepCache &depcache) return Propagate(); } -bool APT::Solver::ToDepCache(pkgDepCache &depcache) +bool APT::Solver::ToDepCache(pkgDepCache &depcache) const { pkgDepCache::ActionGroup group(depcache); for (auto P = cache.PkgBegin(); not P.end(); P++) |
