commit 88f322ed80874faca4d27596fc86a89360e24589 Author: Julien Nabet Date: Sat Jun 8 23:39:12 2013 +0200 cppcheck: Prefer prefix ++/-- operators for non-primitive types diff --git a/poppler/CachedFile.cc b/poppler/CachedFile.cc index 4c20dae..83dc9a0 100644 --- a/poppler/CachedFile.cc +++ b/poppler/CachedFile.cc @@ -213,7 +213,7 @@ size_t CachedFileWriter::write(const char *ptr, size_t size) while (len) { if (chunks) { if (offset == CachedFileChunkSize) { - it++; + ++it; if (it == (*chunks).end()) return written; offset = 0; } diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc index f49049a..e8fc768 100644 --- a/poppler/Catalog.cc +++ b/poppler/Catalog.cc @@ -138,7 +138,7 @@ Catalog::~Catalog() { delete kidsIdxList; if (attrsList) { std::vector::iterator it; - for (it = attrsList->begin() ; it < attrsList->end(); it++ ) { + for (it = attrsList->begin() ; it != attrsList->end(); ++it ) { delete *it; } delete attrsList; @@ -146,7 +146,7 @@ Catalog::~Catalog() { delete pagesRefList; if (pagesList) { std::vector::iterator it; - for (it = pagesList->begin() ; it < pagesList->end(); it++ ) { + for (it = pagesList->begin() ; it != pagesList->end(); ++it ) { if (!(*it)->decRef()) { delete *it; } diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index d8334bc..f3ec550 100644 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -297,7 +297,7 @@ HtmlFontAccu::~HtmlFontAccu(){ int HtmlFontAccu::AddFont(const HtmlFont& font){ std::vector::iterator i; - for (i=accu->begin();i!=accu->end();i++) + for (i=accu->begin();i!=accu->end();++i) { if (font.isEqual(*i)) { diff --git a/utils/HtmlLinks.cc b/utils/HtmlLinks.cc index 1d609f6..78d3d93 100644 --- a/utils/HtmlLinks.cc +++ b/utils/HtmlLinks.cc @@ -128,7 +128,7 @@ HtmlLinks::~HtmlLinks(){ GBool HtmlLinks::inLink(double xmin,double ymin,double xmax,double ymax,int& p)const { - for(std::vector::iterator i=accu->begin();i!=accu->end();i++){ + for(std::vector::iterator i=accu->begin();i!=accu->end();++i){ if (i->inLink(xmin,ymin,xmax,ymax)) { p=(i - accu->begin()); return 1;