From: Danny Al-Gaaf Date: Wed, 13 Mar 2013 15:47:32 +0000 (+0100) Subject: types.h: prefer prefix ++operator for iterators X-Git-Tag: v0.60~79^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d401b0a9eeb93acf6b6f09c703e18a5ff0868ab;p=ceph.git types.h: prefer prefix ++operator for iterators Signed-off-by: Danny Al-Gaaf --- diff --git a/src/include/types.h b/src/include/types.h index dff47ac2b986..55066c978520 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -127,7 +127,7 @@ inline ostream& operator<<(ostream& out, const pair& v) { template inline ostream& operator<<(ostream& out, const vector& v) { out << "["; - for (typename vector::const_iterator p = v.begin(); p != v.end(); p++) { + for (typename vector::const_iterator p = v.begin(); p != v.end(); ++p) { if (p != v.begin()) out << ","; out << *p; } @@ -137,7 +137,7 @@ inline ostream& operator<<(ostream& out, const vector& v) { template inline ostream& operator<<(ostream& out, const deque& v) { out << "<"; - for (typename deque::const_iterator p = v.begin(); p != v.end(); p++) { + for (typename deque::const_iterator p = v.begin(); p != v.end(); ++p) { if (p != v.begin()) out << ","; out << *p; } @@ -149,7 +149,7 @@ template inline ostream& operator<<(ostream& out, const list& ilist) { for (typename list::const_iterator it = ilist.begin(); it != ilist.end(); - it++) { + ++it) { if (it != ilist.begin()) out << ","; out << *it; } @@ -160,7 +160,7 @@ template inline ostream& operator<<(ostream& out, const set& iset) { for (typename set::const_iterator it = iset.begin(); it != iset.end(); - it++) { + ++it) { if (it != iset.begin()) out << ","; out << *it; } @@ -171,7 +171,7 @@ template inline ostream& operator<<(ostream& out, const multiset& iset) { for (typename multiset::const_iterator it = iset.begin(); it != iset.end(); - it++) { + ++it) { if (it != iset.begin()) out << ","; out << *it; } @@ -184,7 +184,7 @@ inline ostream& operator<<(ostream& out, const map& m) out << "{"; for (typename map::const_iterator it = m.begin(); it != m.end(); - it++) { + ++it) { if (it != m.begin()) out << ","; out << it->first << "=" << it->second; } @@ -198,7 +198,7 @@ inline ostream& operator<<(ostream& out, const multimap& m) out << "{{"; for (typename multimap::const_iterator it = m.begin(); it != m.end(); - it++) { + ++it) { if (it != m.begin()) out << ","; out << it->first << "=" << it->second; }