summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cacheset.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index a23659efb..d1e396e0f 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -168,7 +168,8 @@ public: /*{{{*/
pkgCache::PkgIterator getPkg(void) const { return *_iter; }
inline pkgCache::PkgIterator operator*(void) const { return *_iter; };
operator typename Container::const_iterator(void) const { return _iter; }
- inline void operator++(void) { ++_iter; };
+ inline const_iterator& operator++() { ++_iter; return *this; }
+ inline const_iterator operator++(int) { const_iterator tmp(*this); operator++(); return tmp; }
inline bool operator!=(const_iterator const &i) const { return _iter != i._iter; };
inline bool operator==(const_iterator const &i) const { return _iter == i._iter; };
friend std::ostream& operator<<(std::ostream& out, const_iterator i) { return operator<<(out, *i); }
@@ -182,7 +183,8 @@ public: /*{{{*/
inline pkgCache::PkgIterator operator*(void) const { return *_iter; };
operator typename Container::iterator(void) const { return _iter; }
operator typename PackageContainer<Container>::const_iterator() { return PackageContainer<Container>::const_iterator(_iter); }
- inline void operator++(void) { ++_iter; };
+ inline iterator& operator++() { ++_iter; return *this; }
+ inline iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
inline bool operator!=(iterator const &i) const { return _iter != i._iter; };
inline bool operator==(iterator const &i) const { return _iter == i._iter; };
friend std::ostream& operator<<(std::ostream& out, iterator i) { return operator<<(out, *i); }
@@ -482,7 +484,8 @@ public: /*{{{*/
pkgCache::VerIterator getVer(void) const { return *_iter; }
inline pkgCache::VerIterator operator*(void) const { return *_iter; };
operator typename Container::const_iterator(void) const { return _iter; }
- inline void operator++(void) { ++_iter; };
+ inline const_iterator& operator++() { ++_iter; return *this; }
+ inline const_iterator operator++(int) { const_iterator tmp(*this); operator++(); return tmp; }
inline bool operator!=(const_iterator const &i) const { return _iter != i._iter; };
inline bool operator==(const_iterator const &i) const { return _iter == i._iter; };
friend std::ostream& operator<<(std::ostream& out, const_iterator i) { return operator<<(out, *i); }
@@ -496,7 +499,8 @@ public: /*{{{*/
inline pkgCache::VerIterator operator*(void) const { return *_iter; };
operator typename Container::iterator(void) const { return _iter; }
operator typename VersionContainer<Container>::const_iterator() { return VersionContainer<Container>::const_iterator(_iter); }
- inline void operator++(void) { ++_iter; };
+ inline iterator& operator++() { ++_iter; return *this; }
+ inline iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
inline bool operator!=(iterator const &i) const { return _iter != i._iter; };
inline bool operator==(iterator const &i) const { return _iter == i._iter; };
friend std::ostream& operator<<(std::ostream& out, iterator i) { return operator<<(out, *i); }