summaryrefslogtreecommitdiff
path: root/ftparchive/multicompress.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 /ftparchive/multicompress.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 'ftparchive/multicompress.cc')
-rw-r--r--ftparchive/multicompress.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc
index f82879015..08853b0aa 100644
--- a/ftparchive/multicompress.cc
+++ b/ftparchive/multicompress.cc
@@ -48,11 +48,11 @@ MultiCompress::MultiCompress(string const &Output,string const &Compress,
string::const_iterator I = Compress.begin();
for (; I != Compress.end();)
{
- for (; I != Compress.end() && isspace(*I); I++);
+ for (; I != Compress.end() && isspace(*I); ++I);
// Grab a word
string::const_iterator Start = I;
- for (; I != Compress.end() && !isspace(*I); I++);
+ for (; I != Compress.end() && !isspace(*I); ++I);
// Find the matching compressor
std::vector<APT::Configuration::Compressor> Compressors = APT::Configuration::getCompressors();
@@ -129,11 +129,11 @@ bool MultiCompress::GetStat(string const &Output,string const &Compress,struct s
bool DidStat = false;
for (; I != Compress.end();)
{
- for (; I != Compress.end() && isspace(*I); I++);
+ for (; I != Compress.end() && isspace(*I); ++I);
// Grab a word
string::const_iterator Start = I;
- for (; I != Compress.end() && !isspace(*I); I++);
+ for (; I != Compress.end() && !isspace(*I); ++I);
// Find the matching compressor
std::vector<APT::Configuration::Compressor> Compressors = APT::Configuration::getCompressors();