aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-09 21:14:17 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-09 21:14:17 +0100
commit5dbb7636dd880314d5b03379ebfd960b469ee6e9 (patch)
tree6a9a062efbf6aa03dcbdc92b6abf156108904ea2 /paludis/repositories/virtuals
parentc9137efc3ef08b5c52f775dd853c1c675e80cc64 (diff)
downloadpaludis-5dbb7636dd880314d5b03379ebfd960b469ee6e9.tar.gz
paludis-5dbb7636dd880314d5b03379ebfd960b469ee6e9.tar.xz
Replace Validated with WrappedValue
Slightly cleaner code, and will allow us to pass in additional validation options.
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc8
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc10
2 files changed, 9 insertions, 9 deletions
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 33cea8864..7fc615f8c 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -168,7 +168,7 @@ InstalledVirtualsRepository::need_ids() const
std::tr1::shared_ptr<const PackageIDSequence>
InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
- if (q.category().data() != "virtual")
+ if (q.category().value() != "virtual")
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
need_ids();
@@ -183,7 +183,7 @@ InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
std::tr1::shared_ptr<const QualifiedPackageNameSet>
InstalledVirtualsRepository::package_names(const CategoryNamePart & c) const
{
- if (c.data() != "virtual")
+ if (c.value() != "virtual")
return std::tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
need_ids();
@@ -206,7 +206,7 @@ InstalledVirtualsRepository::category_names() const
bool
InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q) const
{
- if (q.category().data() != "virtual")
+ if (q.category().value() != "virtual")
return false;
need_ids();
@@ -217,7 +217,7 @@ InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q) c
bool
InstalledVirtualsRepository::has_category_named(const CategoryNamePart & c) const
{
- return (c.data() == "virtual");
+ return (c.value() == "virtual");
}
void
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index c26a33878..cb0ce8578 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -252,7 +252,7 @@ VirtualsRepository::need_ids() const
std::tr1::shared_ptr<const PackageIDSequence>
VirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
- if (q.category().data() != "virtual")
+ if (q.category().value() != "virtual")
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
need_ids();
@@ -267,7 +267,7 @@ VirtualsRepository::package_ids(const QualifiedPackageName & q) const
std::tr1::shared_ptr<const QualifiedPackageNameSet>
VirtualsRepository::package_names(const CategoryNamePart & c) const
{
- if (c.data() != "virtual")
+ if (c.value() != "virtual")
return std::tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
need_ids();
@@ -290,7 +290,7 @@ VirtualsRepository::category_names() const
bool
VirtualsRepository::has_package_named(const QualifiedPackageName & q) const
{
- if (q.category().data() != "virtual")
+ if (q.category().value() != "virtual")
return false;
need_names();
@@ -308,7 +308,7 @@ VirtualsRepository::has_package_named(const QualifiedPackageName & q) const
bool
VirtualsRepository::has_category_named(const CategoryNamePart & c) const
{
- return (c.data() == "virtual");
+ return (c.value() == "virtual");
}
void
@@ -333,7 +333,7 @@ const std::tr1::shared_ptr<const PackageID>
VirtualsRepository::make_virtual_package_id(
const QualifiedPackageName & virtual_name, const std::tr1::shared_ptr<const PackageID> & provider) const
{
- if (virtual_name.category().data() != "virtual")
+ if (virtual_name.category().value() != "virtual")
throw InternalError(PALUDIS_HERE, "tried to make a virtual package id using '" + stringify(virtual_name) + "', '"
+ stringify(*provider) + "'");