diff options
author | Ryan Pavlik <rpavlik@iastate.edu> | 2011-11-02 17:33:38 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-01-04 06:53:54 (GMT) |
commit | 5ae8bdf49db36b2691ce545e3285f9ee64f92148 (patch) | |
tree | 5ef8285a7f6c54a35544903c05018fd0445aee30 /src/Remember.cc | |
parent | f859e78cb24cf69cc06e4395c58d804537f301c7 (diff) | |
download | fluxbox_pavel-5ae8bdf49db36b2691ce545e3285f9ee64f92148.zip fluxbox_pavel-5ae8bdf49db36b2691ce545e3285f9ee64f92148.tar.bz2 |
Pre-increment non-primitive types.
Found with cppcheck:
"Prefix ++/-- operators should be preferred for non-primitive
types. Pre-increment/decrement can be more efficient than
post-increment/decrement. Post-increment/decrement usually
involves keeping a copy of the previous value around and adds
a little extra code."
Diffstat (limited to 'src/Remember.cc')
-rw-r--r-- | src/Remember.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Remember.cc b/src/Remember.cc index 10aa52c..c4eeb25 100644 --- a/src/Remember.cc +++ b/src/Remember.cc | |||
@@ -240,7 +240,7 @@ string escapeRememberChars(const string& str) { | |||
240 | escaped_str.reserve(str.capacity()); | 240 | escaped_str.reserve(str.capacity()); |
241 | 241 | ||
242 | string::const_iterator i; | 242 | string::const_iterator i; |
243 | for (i = str.begin(); i != str.end(); i++) { | 243 | for (i = str.begin(); i != str.end(); ++i) { |
244 | switch (*i) { | 244 | switch (*i) { |
245 | case '(': case ')': case '[': case ']': | 245 | case '(': case ')': case '[': case ']': |
246 | escaped_str += '\\'; | 246 | escaped_str += '\\'; |
@@ -671,7 +671,7 @@ Application* Remember::find(WinClient &winclient) { | |||
671 | return wc_it->second; | 671 | return wc_it->second; |
672 | else { | 672 | else { |
673 | Patterns::iterator it = m_pats->begin(); | 673 | Patterns::iterator it = m_pats->begin(); |
674 | for (; it != m_pats->end(); it++) | 674 | for (; it != m_pats->end(); ++it) |
675 | if (it->first->match(winclient) && | 675 | if (it->first->match(winclient) && |
676 | it->second->is_transient == winclient.isTransient()) { | 676 | it->second->is_transient == winclient.isTransient()) { |
677 | it->first->addMatch(); | 677 | it->first->addMatch(); |
@@ -893,7 +893,7 @@ void Remember::save() { | |||
893 | 893 | ||
894 | Patterns::iterator git = m_pats->begin(); | 894 | Patterns::iterator git = m_pats->begin(); |
895 | Patterns::iterator git_end = m_pats->end(); | 895 | Patterns::iterator git_end = m_pats->end(); |
896 | for (; git != git_end; git++) { | 896 | for (; git != git_end; ++git) { |
897 | if (git->second == &a) { | 897 | if (git->second == &a) { |
898 | apps_file << (a.is_transient ? " [transient]" : " [app]") << | 898 | apps_file << (a.is_transient ? " [transient]" : " [app]") << |
899 | git->first->toString()<<endl; | 899 | git->first->toString()<<endl; |
@@ -1389,7 +1389,7 @@ void Remember::updateClientClose(WinClient &winclient) { | |||
1389 | 1389 | ||
1390 | if (app) { | 1390 | if (app) { |
1391 | Patterns::iterator it = m_pats->begin(); | 1391 | Patterns::iterator it = m_pats->begin(); |
1392 | for (; it != m_pats->end(); it++) { | 1392 | for (; it != m_pats->end(); ++it) { |
1393 | if (it->second == app) { | 1393 | if (it->second == app) { |
1394 | it->first->removeMatch(); | 1394 | it->first->removeMatch(); |
1395 | break; | 1395 | break; |