Prefer prefix ++/-- on non-primitive types

Postfix ++/-- might cause the creation of a tmp instance
that might be optimized out. Mights are bad. Prefix doesn't
have this problem.
This commit is contained in:
Michael Cook (mackal)
2014-01-13 22:14:02 -05:00
parent 47c33f3b31
commit 4216627604
51 changed files with 405 additions and 426 deletions
+4 -4
View File
@@ -294,7 +294,7 @@ PTimerList::~PTimerList() {
while(s != _list.end()) {
if(s->second != nullptr)
delete s->second;
s++;
++s;
}
}
@@ -305,7 +305,7 @@ bool PTimerList::Load(Database *db) {
while(s != _list.end()) {
if(s->second != nullptr)
delete s->second;
s++;
++s;
}
_list.clear();
@@ -373,7 +373,7 @@ bool PTimerList::Store(Database *db) {
if(!s->second->Store(db))
res = false;
}
s++;
++s;
}
return(res);
}
@@ -474,7 +474,7 @@ void PTimerList::ToVector(std::vector< std::pair<pTimerType, PersistentTimer *>
p.second = s->second;
out.push_back(p);
}
s++;
++s;
}
}