diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-05-17 18:22:18 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-05-17 18:22:18 +0200 |
commit | 6935cd05677544028e0d6baefc2e29933bf5fe8b (patch) | |
tree | c23aa485e3ca5d0e58d02aadf0af8c8e15c54ec3 | |
parent | 27e8981a61bb9881154e727deb3d4adf75ad4d0a (diff) |
* apt-pkg/depcache.cc:
- use a boolean instead of an int for Add/Remove in AddStates
similar to how it works with AddSizes
-rw-r--r-- | apt-pkg/depcache.cc | 5 | ||||
-rw-r--r-- | apt-pkg/depcache.h | 6 | ||||
-rw-r--r-- | debian/changelog | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index a91144466..b7b2f302f 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -407,7 +407,7 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res) // DepCache::AddSizes - Add the packages sizes to the counters /*{{{*/ // --------------------------------------------------------------------- /* Call with Inverse = true to preform the inverse opration */ -void pkgDepCache::AddSizes(const PkgIterator &Pkg, bool const &Inverse) +void pkgDepCache::AddSizes(const PkgIterator &Pkg, bool const Inverse) { StateCache &P = PkgState[Pkg->ID]; @@ -478,8 +478,9 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg, bool const &Inverse) calld Remove/Add itself. Remember, dependencies can be circular so while processing a dep for Pkg it is possible that Add/Remove will be called on Pkg */ -void pkgDepCache::AddStates(const PkgIterator &Pkg,int Add) +void pkgDepCache::AddStates(const PkgIterator &Pkg, bool const Invert) { + signed char const Add = (Invert == false) ? 1 : -1; StateCache &State = PkgState[Pkg->ID]; // The Package is broken (either minimal dep or policy dep) diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index d3f9e3924..1a982ea18 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -316,10 +316,10 @@ class pkgDepCache : protected pkgCache::Namespace void Update(PkgIterator const &P); // Count manipulators - void AddSizes(const PkgIterator &Pkg, bool const &Invert = false); + void AddSizes(const PkgIterator &Pkg, bool const Invert = false); inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg, true);}; - void AddStates(const PkgIterator &Pkg,int Add = 1); - inline void RemoveStates(const PkgIterator &Pkg) {AddStates(Pkg,-1);}; + void AddStates(const PkgIterator &Pkg, bool const Invert = false); + inline void RemoveStates(const PkgIterator &Pkg) {AddStates(Pkg,true);}; public: diff --git a/debian/changelog b/debian/changelog index f1f076a68..499f7f8d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,12 +10,15 @@ apt (0.8.15) UNRELEASED; urgency=low * apt-pkg/pkgcache.h: - clean up mess with the "all" handling in MultiArch to fix LP: #733741 cleanly for everyone now + * apt-pkg/depcache.cc: + - use a boolean instead of an int for Add/Remove in AddStates + similar to how it works with AddSizes [ Stefano Zacchiroli ] * doc/external-dependency-solver-protocol.txt: - describe EDSP and the configuration interface around it - -- David Kalnischkies <kalnischkies@gmail.com> Tue, 17 May 2011 17:44:16 +0200 + -- David Kalnischkies <kalnischkies@gmail.com> Tue, 17 May 2011 17:51:10 +0200 apt (0.8.14.2) UNRELEASED; urgency=low |