summaryrefslogtreecommitdiff
path: root/apt-pkg/orderlist.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-11 20:53:28 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-11 20:53:28 +0200
commitf7f0d6c7560a8f71707e7852a512469147aa9f84 (patch)
tree5bec681b4e798a2b35bea180213df399c51920d9 /apt-pkg/orderlist.cc
parentdd6882853b4555a6113740afca417acbaa060043 (diff)
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.
Diffstat (limited to 'apt-pkg/orderlist.cc')
-rw-r--r--apt-pkg/orderlist.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index 19661fc2d..6034138cf 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -323,7 +323,7 @@ int pkgOrderList::Score(PkgIterator Pkg)
Score += ScoreImmediate;
for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList();
- D.end() == false; D++)
+ D.end() == false; ++D)
if (D->Type == pkgCache::Dep::PreDepends)
{
Score += ScorePreDepends;
@@ -488,7 +488,7 @@ bool pkgOrderList::VisitRProvides(DepFunc F,VerIterator Ver)
return true;
bool Res = true;
- for (PrvIterator P = Ver.ProvidesList(); P.end() == false; P++)
+ for (PrvIterator P = Ver.ProvidesList(); P.end() == false; ++P)
Res &= (this->*F)(P.ParentPkg().RevDependsList());
return Res;
}
@@ -615,7 +615,7 @@ bool pkgOrderList::VisitNode(PkgIterator Pkg)
Loops are preprocessed and logged. */
bool pkgOrderList::DepUnPackCrit(DepIterator D)
{
- for (; D.end() == false; D++)
+ for (; D.end() == false; ++D)
{
if (D.Reverse() == true)
{
@@ -693,7 +693,7 @@ bool pkgOrderList::DepUnPackPreD(DepIterator D)
if (D.Reverse() == true)
return DepUnPackCrit(D);
- for (; D.end() == false; D++)
+ for (; D.end() == false; ++D)
{
if (D.IsCritical() == false)
continue;
@@ -736,7 +736,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D)
if (D.Reverse() == true)
return true;
- for (; D.end() == false; D++)
+ for (; D.end() == false; ++D)
{
/* Only consider the PreDepends or Depends. Depends are only
considered at the lowest depth or in the case of immediate
@@ -791,7 +791,7 @@ bool pkgOrderList::DepUnPackPre(DepIterator D)
bool pkgOrderList::DepUnPackDep(DepIterator D)
{
- for (; D.end() == false; D++)
+ for (; D.end() == false; ++D)
if (D.IsCritical() == true)
{
if (D.Reverse() == true)
@@ -846,7 +846,7 @@ bool pkgOrderList::DepConfigure(DepIterator D)
if (D.Reverse() == true)
return true;
- for (; D.end() == false; D++)
+ for (; D.end() == false; ++D)
if (D->Type == pkgCache::Dep::Depends)
if (VisitProvides(D,false) == false)
return false;
@@ -868,7 +868,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
{
if (D.Reverse() == false)
return true;
- for (; D.end() == false; D++)
+ for (; D.end() == false; ++D)
if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
{
// Duplication elimination, consider the current version only