Prefer prefix ++/-- operators for non-primitive types
Part of bug #80537
diff --git a/poppler/CachedFile.cc b/poppler/CachedFile.cc
index 4c20dae..b0ae838 100644
--- a/poppler/CachedFile.cc
+++ b/poppler/CachedFile.cc
@@ -7,6 +7,7 @@
// Copyright 2009 Stefan Thomas <thomas@eload24.com>
// Copyright 2010, 2011 Hib Eris <hib@hiberis.nl>
// Copyright 2010 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
//
//========================================================================
@@ -213,7 +214,7 @@
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 cf6dff0..9b4f3a3 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -25,6 +25,7 @@
// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
+// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -129,7 +130,7 @@
delete kidsIdxList;
if (attrsList) {
std::vector<PageAttrs *>::iterator it;
- for (it = attrsList->begin() ; it < attrsList->end(); it++ ) {
+ for (it = attrsList->begin() ; it != attrsList->end(); ++it ) {
delete *it;
}
delete attrsList;
@@ -137,7 +138,7 @@
delete pagesRefList;
if (pagesList) {
std::vector<Dict *>::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..a12992e 100644
--- a/utils/HtmlFonts.cc
+++ b/utils/HtmlFonts.cc
@@ -25,6 +25,7 @@
// Copyright (C) 2011 Stephen Reichling <sreichling@chegg.com>
// Copyright (C) 2012 Igor Slepchin <igor.slepchin@gmail.com>
// Copyright (C) 2012 Luis Parravicini <lparravi@gmail.com>
+// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -297,7 +298,7 @@
int HtmlFontAccu::AddFont(const HtmlFont& font){
std::vector<HtmlFont>::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..34b246e 100644
--- a/utils/HtmlLinks.cc
+++ b/utils/HtmlLinks.cc
@@ -19,6 +19,7 @@
//
// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
// Copyright (C) 2010 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -128,7 +129,7 @@
GBool HtmlLinks::inLink(double xmin,double ymin,double xmax,double ymax,int& p)const {
- for(std::vector<HtmlLink>::iterator i=accu->begin();i!=accu->end();i++){
+ for(std::vector<HtmlLink>::iterator i=accu->begin();i!=accu->end();++i){
if (i->inLink(xmin,ymin,xmax,ymax)) {
p=(i - accu->begin());
return 1;