From f7f0d6c7560a8f71707e7852a512469147aa9f84 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 11 Aug 2011 20:53:28 +0200 Subject: cppcheck complains about some possible speed improvements which could be done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types. --- apt-pkg/deb/debmetaindex.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apt-pkg/deb/debmetaindex.cc') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index a91cc34e9..f6c50742e 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -206,7 +206,7 @@ vector * debReleaseIndex::ComputeIndexTargets() const { for (std::set::const_iterator s = sections.begin(); s != sections.end(); ++s) { for (std::vector::const_iterator l = lang.begin(); - l != lang.end(); l++) { + l != lang.end(); ++l) { if (*l == "none") continue; IndexTarget * Target = new OptionalIndexTarget(); Target->ShortDesc = "Translation-" + *l; @@ -236,7 +236,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const // special case for --print-uris if (GetAll) { vector *targets = ComputeIndexTargets(); - for (vector ::const_iterator Target = targets->begin(); Target != targets->end(); Target++) { + for (vector ::const_iterator Target = targets->begin(); Target != targets->end(); ++Target) { new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, HashString()); } @@ -279,7 +279,7 @@ vector *debReleaseIndex::GetIndexFiles() { if (src != ArchEntries.end()) { vector const SectionEntries = src->second; for (vector::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) + I != SectionEntries.end(); ++I) Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted())); } @@ -294,7 +294,7 @@ vector *debReleaseIndex::GetIndexFiles() { if (a->first == "source") continue; for (vector::const_iterator I = a->second.begin(); - I != a->second.end(); I++) { + I != a->second.end(); ++I) { Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted(), a->first)); sections[(*I)->Section].insert(lang.begin(), lang.end()); } @@ -303,7 +303,7 @@ vector *debReleaseIndex::GetIndexFiles() { for (map >::const_iterator s = sections.begin(); s != sections.end(); ++s) for (set::const_iterator l = s->second.begin(); - l != s->second.end(); l++) { + l != s->second.end(); ++l) { if (*l == "none") continue; Indexes->push_back(new debTranslationsIndex(URI,Dist,s->first,(*l).c_str())); } @@ -351,7 +351,7 @@ class debSLTypeDebian : public pkgSourceList::Type APT::Configuration::getArchitectures(); for (vector::const_iterator I = List.begin(); - I != List.end(); I++) + I != List.end(); ++I) { // We only worry about debian entries here if (strcmp((*I)->GetType(), "deb") != 0) -- cgit v1.2.3