aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
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/e
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/e')
-rw-r--r--paludis/repositories/e/e_choice_value.hh3
-rw-r--r--paludis/repositories/e/e_choices_key.cc4
-rw-r--r--paludis/repositories/e/e_repository_sets.cc6
-rw-r--r--paludis/repositories/e/iuse.cc4
-rw-r--r--paludis/repositories/e/metadata_xml.cc3
-rw-r--r--paludis/repositories/e/myoption.cc3
-rw-r--r--paludis/repositories/e/myoption.hh3
-rw-r--r--paludis/repositories/e/use_desc.cc6
-rw-r--r--paludis/repositories/e/xml_things.cc1
9 files changed, 15 insertions, 18 deletions
diff --git a/paludis/repositories/e/e_choice_value.hh b/paludis/repositories/e/e_choice_value.hh
index 7ecd06f54..20b0afec2 100644
--- a/paludis/repositories/e/e_choice_value.hh
+++ b/paludis/repositories/e/e_choice_value.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -21,7 +21,6 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_E_CHOICE_VALUE_HH 1
#include <paludis/util/attributes.hh>
-#include <paludis/util/validated.hh>
#include <paludis/choice.hh>
#include <paludis/name.hh>
#include <tr1/functional>
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 1135ce3c3..54dc236ac 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -119,7 +119,7 @@ namespace
std::string lower_s;
std::transform(s.begin(), s.end(), std::back_inserter(lower_s), &::tolower);
lower_s.append(delim);
- return (0 == flag.data().compare(0, lower_s.length(), lower_s, 0, lower_s.length()));
+ return (0 == flag.value().compare(0, lower_s.length(), lower_s, 0, lower_s.length()));
}
};
@@ -540,7 +540,7 @@ EChoicesKey::populate_iuse() const
for (std::map<ChoiceNameWithPrefix, ChoiceOptions>::const_iterator i(i_values.begin()), i_end(i_values.end()) ;
i != i_end ; ++i)
if (IsExpand(i->first, delim)(*u))
- values.insert(UnprefixedChoiceName(i->first.data().substr(u->length() + delim.length())));
+ values.insert(UnprefixedChoiceName(i->first.value().substr(u->length() + delim.length())));
for (std::set<UnprefixedChoiceName>::const_iterator v(values.begin()), v_end(values.end()) ;
v != v_end ; ++v)
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index d3d29438b..e87a6d38c 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -102,11 +102,11 @@ ERepositorySets::package_set(const SetName & ss) const
{
using namespace std::tr1::placeholders;
- if ("system" == ss.data())
+ if ("system" == ss.value())
throw InternalError(PALUDIS_HERE, "system set should've been handled by ERepository");
- else if ("security" == ss.data())
+ else if ("security" == ss.value())
return security_set(false);
- else if ("insecurity" == ss.data())
+ else if ("insecurity" == ss.value())
return security_set(true);
std::pair<SetName, SetFileSetOperatorMode> s(find_base_set_name_and_suffix_mode(ss));
diff --git a/paludis/repositories/e/iuse.cc b/paludis/repositories/e/iuse.cc
index 7e6f5b1c9..7f3c3214a 100644
--- a/paludis/repositories/e/iuse.cc
+++ b/paludis/repositories/e/iuse.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,8 +22,8 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/tribool.hh>
-#include <paludis/util/validated.hh>
#include <paludis/choice.hh>
+#include <paludis/name.hh>
#include <istream>
#include <ostream>
diff --git a/paludis/repositories/e/metadata_xml.cc b/paludis/repositories/e/metadata_xml.cc
index fd6005621..09d3a89c0 100644
--- a/paludis/repositories/e/metadata_xml.cc
+++ b/paludis/repositories/e/metadata_xml.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,7 +22,6 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/map-impl.hh>
-#include <paludis/util/validated.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/hashes.hh>
diff --git a/paludis/repositories/e/myoption.cc b/paludis/repositories/e/myoption.cc
index 4044cada5..e288ae164 100644
--- a/paludis/repositories/e/myoption.cc
+++ b/paludis/repositories/e/myoption.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -18,7 +18,6 @@
*/
#include <paludis/repositories/e/myoption.hh>
-#include <paludis/util/validated.hh>
#include <paludis/choice.hh>
using namespace paludis;
diff --git a/paludis/repositories/e/myoption.hh b/paludis/repositories/e/myoption.hh
index ea0e1e4e3..871bfc5fd 100644
--- a/paludis/repositories/e/myoption.hh
+++ b/paludis/repositories/e/myoption.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +23,7 @@
#include <paludis/util/attributes.hh>
#include <paludis/choice-fwd.hh>
#include <utility>
+#include <string>
namespace paludis
{
diff --git a/paludis/repositories/e/use_desc.cc b/paludis/repositories/e/use_desc.cc
index 2a3b31d14..39bb94df0 100644
--- a/paludis/repositories/e/use_desc.cc
+++ b/paludis/repositories/e/use_desc.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -97,12 +97,12 @@ UseDesc::describe(
std::tr1::unordered_map<QualifiedPackageName, UseDescs, Hash<QualifiedPackageName> >::const_iterator i(_imp->local_descs.find(id));
if (i != _imp->local_descs.end())
{
- UseDescs::const_iterator j(i->second.find(make_pair(prefix, flag)));
+ UseDescs::const_iterator j(i->second.find(std::make_pair(prefix, flag)));
if (j != i->second.end())
return j->second;
}
- UseDescs::const_iterator j(_imp->global_descs.find(make_pair(prefix, flag)));
+ UseDescs::const_iterator j(_imp->global_descs.find(std::make_pair(prefix, flag)));
if (j != _imp->global_descs.end())
return j->second;
diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc
index 5c36c15f5..1800e4421 100644
--- a/paludis/repositories/e/xml_things.cc
+++ b/paludis/repositories/e/xml_things.cc
@@ -24,7 +24,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
#include <paludis/util/tokeniser.hh>
-#include <paludis/util/validated.hh>
#include <paludis/choice.hh>
#include <set>