From 4f89fdb05ba7b39b86cb7034c22692faadb06f6b Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Fri, 21 Oct 2011 18:06:32 +0200 Subject: cppcheck (bzr r10687) --- src/trace/siox.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/trace/siox.cpp') diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp index a30d903cd..e7ef5b0c0 100644 --- a/src/trace/siox.cpp +++ b/src/trace/siox.cpp @@ -1011,7 +1011,7 @@ SioxImage Siox::extractForeground(const SioxImage &originalImage, } tupel.minFgDist = minFg; tupel.indexMinFg = minIndex; - if (fgSignature.size() == 0) + if (fgSignature.empty()) { isBackground = (minBg <= clusterSize); // remove next line to force behaviour of old algorithm @@ -1414,7 +1414,7 @@ int Siox::depthFirstSearch(int startPos, } - while (pixelsToVisit.size() > 0) + while (!pixelsToVisit.empty()) { int pos = pixelsToVisit[pixelsToVisit.size() - 1]; pixelsToVisit.erase(pixelsToVisit.end() - 1); @@ -1486,7 +1486,7 @@ void Siox::fillColorRegions() // int componentSize = 1; pixelsToVisit.push_back(i); // depth first search to fill region - while (pixelsToVisit.size() > 0) + while (!pixelsToVisit.empty()) { int pos = pixelsToVisit[pixelsToVisit.size() - 1]; pixelsToVisit.erase(pixelsToVisit.end() - 1); -- cgit v1.2.3