summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.h
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-03-06 18:10:02 +0100
committerMichael Vogt <egon@debian-devbox>2012-03-06 18:10:02 +0100
commit7296e47e10687e554a4756f65e9c842f88e696e3 (patch)
treece9c6f63729900dcf0d221c2aaafbfef91f34ed4 /apt-pkg/cacheset.h
parente2625f67efae93c2c8affff41ce3e5fb9a507f30 (diff)
parentde31189fca11b7de937a64de90bcc050b76f9181 (diff)
merged from lp:~donkult/apt/experimental
Diffstat (limited to 'apt-pkg/cacheset.h')
-rw-r--r--apt-pkg/cacheset.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index 91d7eec1c..6f0a0e358 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -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(); };