aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-25 14:12:53 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-25 14:12:53 +0000
commit8aca0f10d1934e4d0170df3eea4c6ab1428a7027 (patch)
tree7de5bf5b57ac07ef107e1e86f365334b8839707b /paludis/repositories/fake
parentfa16225ca76ef2bf07174aee6460264c63f2b104 (diff)
downloadpaludis-8aca0f10d1934e4d0170df3eea4c6ab1428a7027.tar.gz
paludis-8aca0f10d1934e4d0170df3eea4c6ab1428a7027.tar.xz
Rename const iterators to ConstIterator, mutable to Iterator. Fixes: ticket:365
Diffstat (limited to 'paludis/repositories/fake')
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc8
-rw-r--r--paludis/repositories/fake/fake_package_id.cc8
-rw-r--r--paludis/repositories/fake/fake_repository.cc8
-rw-r--r--paludis/repositories/fake/fake_repository.hh4
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc4
5 files changed, 16 insertions, 16 deletions
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 4030c0576..9ced042b0 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -73,15 +73,15 @@ FakeInstalledRepository::provided_packages() const
tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence);
tr1::shared_ptr<const CategoryNamePartSet> cats(category_names());
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs(package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> vers(package_ids(*p));
- for (PackageIDSequence::Iterator v(vers->begin()), v_end(vers->end()) ;
+ for (PackageIDSequence::ConstIterator v(vers->begin()), v_end(vers->end()) ;
v != v_end ; ++v)
{
if (! (*v)->provide_key())
@@ -90,7 +90,7 @@ FakeInstalledRepository::provided_packages() const
DepSpecFlattener f(environment(), *v);
(*v)->provide_key()->value()->accept(f);
- for (DepSpecFlattener::Iterator q(f.begin()), q_end(f.end()) ; q != q_end ; ++q)
+ for (DepSpecFlattener::ConstIterator q(f.begin()), q_end(f.end()) ; q != q_end ; ++q)
result->push_back(RepositoryProvidesEntry::create()
.virtual_name(QualifiedPackageName((*q)->text()))
.provided_by(*v));
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 90f5ac98a..3dd6bd9b9 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -783,7 +783,7 @@ std::string
FakeMetadataIUseSetKey::pretty_print_flat(const Formatter<IUseFlag> & f) const
{
std::string result;
- for (IUseFlagSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (IUseFlagSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
@@ -809,7 +809,7 @@ FakeMetadataIUseSetKey::pretty_print_flat_with_comparison(
const Formatter<IUseFlag> & f) const
{
std::string result;
- for (IUseFlagSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (IUseFlagSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
@@ -844,7 +844,7 @@ FakeMetadataIUseSetKey::pretty_print_flat_with_comparison(
else
{
using namespace tr1::placeholders;
- IUseFlagSet::Iterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
+ IUseFlagSet::ConstIterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
tr1::bind(std::equal_to<UseFlagName>(), i->flag, tr1::bind<const UseFlagName>(&IUseFlag::flag, _1))));
if (p == id->iuse_key()->value()->end())
@@ -864,7 +864,7 @@ std::string
FakeMetadataKeywordSetKey::pretty_print_flat(const Formatter<KeywordName> & f) const
{
std::string result;
- for (KeywordNameSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (KeywordNameSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 219378bd0..03f25a649 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -159,15 +159,15 @@ FakeRepository::do_some_ids_might_support_action(const SupportsActionTestBase &
return q.result;
}
-FakeRepository::MirrorsIterator
+FakeRepository::MirrorsConstIterator
FakeRepository::begin_mirrors(const std::string & s) const
{
- return MirrorsIterator(_imp->mirrors.equal_range(s).first);
+ return MirrorsConstIterator(_imp->mirrors.equal_range(s).first);
}
-FakeRepository::MirrorsIterator
+FakeRepository::MirrorsConstIterator
FakeRepository::end_mirrors(const std::string & s) const
{
- return MirrorsIterator(_imp->mirrors.equal_range(s).second);
+ return MirrorsConstIterator(_imp->mirrors.equal_range(s).second);
}
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index c3aa54b44..504db03a9 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -62,9 +62,9 @@ namespace paludis
/* RepositoryMirrorsInterface */
- virtual MirrorsIterator begin_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator begin_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual MirrorsIterator end_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator end_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index b7d164790..7eedf4b90 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -119,7 +119,7 @@ FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
if (! has_category_named(c))
return result;
- PackageNamePartSet::Iterator p(_imp->package_names.find(c)->second->begin()),
+ PackageNamePartSet::ConstIterator p(_imp->package_names.find(c)->second->begin()),
p_end(_imp->package_names.find(c)->second->end());
for ( ; p != p_end ; ++p)
result->insert(c + *p);
@@ -194,7 +194,7 @@ FakeRepositoryBase::invalidate_masks()
{
for (std::map<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::iterator it(_imp->ids.begin()), it_end(_imp->ids.end());
it_end != it; ++it)
- for (PackageIDSequence::Iterator it2(it->second->begin()), it2_end(it->second->end());
+ for (PackageIDSequence::ConstIterator it2(it->second->begin()), it2_end(it->second->end());
it2_end != it2; ++it2)
(*it2)->invalidate_masks();
}