summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-05 13:38:17 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-05 13:38:17 +0200
commitc45f2d1995a58c7a5a8616c6fbf9f95ee4ccfd49 (patch)
tree9d72186cb04396122608b099feedce8b579e1d2d /apt-pkg
parent9f1f17ccd4f84c23410ae62911c85f5836c3b503 (diff)
do not insert end() Iterators into the CacheSet even if requested
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cacheset.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index 708531b4a..b65e053e6 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -61,6 +61,9 @@ public: /*{{{*/
// 103. set::iterator is required to be modifiable, but this allows modification of keys
typedef typename APT::PackageSet::const_iterator iterator;
+ using std::set<pkgCache::PkgIterator>::insert;
+ inline void insert(pkgCache::PkgIterator const &P) { if (P.end() == false) std::set<pkgCache::PkgIterator>::insert(P); };
+
/** \brief returns all packages in the cache whose name matchs a given pattern
A simple helper responsible for executing a regular expression on all
@@ -145,6 +148,9 @@ public: /*{{{*/
// 103. set::iterator is required to be modifiable, but this allows modification of keys
typedef typename APT::VersionSet::const_iterator iterator;
+ using std::set<pkgCache::VerIterator>::insert;
+ inline void insert(pkgCache::VerIterator const &V) { if (V.end() == false) std::set<pkgCache::VerIterator>::insert(V); };
+
/** \brief specifies which version(s) will be returned if non is given */
enum Version {
/** All versions */