summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:49:25 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:49:25 +0200
commit804de19f5f89a94d445edc3b1b1cf95b55f71258 (patch)
tree5024d4d126b020b038ae162821c6227cb9856ba8 /apt-pkg
parent5e49cbb7b65a79cf76ba251f6493fbd75e812466 (diff)
fix: Prefer prefix ++/-- operators for non-primitive types
Git-Dch: Ignore Reported-By: cppcheck
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/pkgcachegen.cc2
-rw-r--r--apt-pkg/sourcelist.cc8
2 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 6df3d5ebd..6bb246e9f 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -362,7 +362,7 @@ bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator
/* We know the list is sorted so we use that fact in the search.
Insertion of new versions is done with correct sorting */
int Res = 1;
- for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++)
+ for (; Ver.end() == false; LastVer = &Ver->NextVer, ++Ver)
{
Res = Cache.VS->CmpVersion(Version,Ver.VerStr());
// Version is higher as current version - insert here
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index e37899ec6..7170e8b5b 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -119,7 +119,7 @@ bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List,
std::vector<std::string> list_section = StringSplit(Section, " ");
for (std::vector<std::string>::const_iterator U = list_uris.begin();
- U != list_uris.end(); U++)
+ U != list_uris.end(); ++U)
{
std::string URI = (*U);
if (!FixupURI(URI))
@@ -129,10 +129,10 @@ bool pkgSourceList::Type::ParseStanza(vector<metaIndex *> &List,
}
for (std::vector<std::string>::const_iterator I = list_dist.begin();
- I != list_dist.end(); I++)
+ I != list_dist.end(); ++I)
{
for (std::vector<std::string>::const_iterator J = list_section.begin();
- J != list_section.end(); J++)
+ J != list_section.end(); ++J)
{
if (CreateItem(List, URI, (*I), (*J), Options) == false)
{
@@ -408,7 +408,7 @@ int pkgSourceList::ParseFileDeb822(string File)
string const types = Tags.FindS("Types");
std::vector<std::string> list_types = StringSplit(types, " ");
for (std::vector<std::string>::const_iterator I = list_types.begin();
- I != list_types.end(); I++)
+ I != list_types.end(); ++I)
{
Type *Parse = Type::GetType((*I).c_str());
if (Parse == 0)