summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-06-09 12:12:06 +0200
committerAlbert Astals Cid <aacid@kde.org>2013-06-09 12:16:12 +0200
commit25f453ef49004452ac4c201d59d9ce2ef52ffeee (patch)
tree8cb8f922e1e787373efae51e9c1b33fe531688a0
parented01688a899c5e7560a93ca2424ca302ff3452f1 (diff)
Prefer prefix ++/-- operators for non-primitive types
Part of bug #80537
-rw-r--r--poppler/CachedFile.cc3
-rw-r--r--poppler/Catalog.cc5
-rw-r--r--utils/HtmlFonts.cc3
-rw-r--r--utils/HtmlLinks.cc3
4 files changed, 9 insertions, 5 deletions
diff --git a/poppler/CachedFile.cc b/poppler/CachedFile.cc
index 4c20daef..b0ae8388 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 @@ 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 cf6dff0a..9b4f3a36 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 @@ Catalog::~Catalog() {
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 @@ Catalog::~Catalog() {
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 d8334bce..a12992ec 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 @@ HtmlFontAccu::~HtmlFontAccu(){
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 1d609f67..34b246e0 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 @@ HtmlLinks::~HtmlLinks(){
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;