]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheset.h
* apt-pkg/contrib/fileutl.h:
[apt.git] / apt-pkg / cacheset.h
index a23659efbb5c6beed35a05b55fec8c850afe3175..91d7eec1cfb0311a8d412fe5e51c5497d163a58f 100644 (file)
 
 #include <apt-pkg/error.h>
 #include <apt-pkg/pkgcache.h>
+
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/cachefile.h>
+#endif
                                                                        /*}}}*/
 
 class pkgCacheFile;
@@ -168,7 +172,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 +187,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 +488,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 +503,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); }