aboutsummaryrefslogtreecommitdiff
path: root/paludis/package_id.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-26 18:58:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-26 19:00:38 +0000
commit5c2a332b70243cb583a29bb74f712bfca2c1fb76 (patch)
tree0a01f8e624caa2c6639181df45fa80bc20adba84 /paludis/package_id.cc
parent79d9f02fb355d81c472f3d94b8b85d5a7639210c (diff)
downloadpaludis-5c2a332b70243cb583a29bb74f712bfca2c1fb76.tar.gz
paludis-5c2a332b70243cb583a29bb74f712bfca2c1fb76.tar.xz
Use Environment rather than PackageDatabase
Diffstat (limited to 'paludis/package_id.cc')
-rw-r--r--paludis/package_id.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/paludis/package_id.cc b/paludis/package_id.cc
index 1eafa8cec..82663e2e1 100644
--- a/paludis/package_id.cc
+++ b/paludis/package_id.cc
@@ -19,6 +19,11 @@
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
+#include <paludis/name.hh>
+#include <paludis/version_spec.hh>
+#include <paludis/repository.hh>
+#include <paludis/environment.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/sequence-impl.hh>
@@ -29,10 +34,7 @@
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/wrapped_output_iterator-impl.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/name.hh>
-#include <paludis/version_spec.hh>
-#include <paludis/repository.hh>
-#include <paludis/package_database.hh>
+
#include <functional>
#include <unordered_map>
#include <list>
@@ -170,12 +172,11 @@ namespace paludis
};
}
-PackageIDComparator::PackageIDComparator(const PackageDatabase * const db) :
+PackageIDComparator::PackageIDComparator(const Environment * const e) :
_imp()
{
unsigned c(0);
- for (PackageDatabase::RepositoryConstIterator r(db->begin_repositories()),
- r_end(db->end_repositories()) ; r != r_end ; ++r)
+ for (auto r(e->begin_repositories()), r_end(e->end_repositories()) ; r != r_end ; ++r)
_imp->m.insert(std::make_pair((*r)->name(), ++c));
}