]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheset.h
* apt-pkg/indexrecords.cc:
[apt.git] / apt-pkg / cacheset.h
index 91d7eec1cfb0311a8d412fe5e51c5497d163a58f..6f0a0e3584dc318f8520b81051a8b6de9c9bd058 100644 (file)
@@ -191,6 +191,8 @@ public:                                                                     /*{{{*/
                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; };
+               inline iterator& operator=(iterator const &i) { _iter = i._iter; return *this; };
+               inline iterator& operator=(typename Container::iterator const &i) { _iter = i; return *this; };
                friend std::ostream& operator<<(std::ostream& out, iterator i) { return operator<<(out, *i); }
        };
                                                                        /*}}}*/
@@ -201,7 +203,9 @@ public:                                                                     /*{{{*/
 
        bool empty() const { return _cont.empty(); };
        void clear() { return _cont.clear(); };
+       //FIXME: on ABI break, replace the first with the second without bool
        void erase(iterator position) { _cont.erase((typename Container::iterator)position); };
+       iterator& erase(iterator &position, bool) { return position = _cont.erase((typename Container::iterator)position); };
        size_t erase(const pkgCache::PkgIterator x) { return _cont.erase(x); };
        void erase(iterator first, iterator last) { _cont.erase(first, last); };
        size_t size() const { return _cont.size(); };
@@ -507,6 +511,8 @@ public:                                                                     /*{{{*/
                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; };
+               inline iterator& operator=(iterator const &i) { _iter = i._iter; return *this; };
+               inline iterator& operator=(typename Container::iterator const &i) { _iter = i; return *this; };
                friend std::ostream& operator<<(std::ostream& out, iterator i) { return operator<<(out, *i); }
        };
                                                                        /*}}}*/
@@ -516,7 +522,9 @@ public:                                                                     /*{{{*/
        void insert(const_iterator begin, const_iterator end) { _cont.insert(begin, end); };
        bool empty() const { return _cont.empty(); };
        void clear() { return _cont.clear(); };
+       //FIXME: on ABI break, replace the first with the second without bool
        void erase(iterator position) { _cont.erase((typename Container::iterator)position); };
+       iterator& erase(iterator &position, bool) { return position = _cont.erase((typename Container::iterator)position); };
        size_t erase(const pkgCache::VerIterator x) { return _cont.erase(x); };
        void erase(iterator first, iterator last) { _cont.erase(first, last); };
        size_t size() const { return _cont.size(); };