aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
authorRyan Pavlik <rpavlik@iastate.edu>2011-11-02 17:33:38 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-01-04 06:53:54 (GMT)
commit5ae8bdf49db36b2691ce545e3285f9ee64f92148 (patch)
tree5ef8285a7f6c54a35544903c05018fd0445aee30 /src/Slit.cc
parentf859e78cb24cf69cc06e4395c58d804537f301c7 (diff)
downloadfluxbox-5ae8bdf49db36b2691ce545e3285f9ee64f92148.zip
fluxbox-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/Slit.cc')
-rw-r--r--src/Slit.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index ccd60ab..02eb877 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -879,7 +879,7 @@ void Slit::clientUp(SlitClient* client) {
879 } 879 }
880 880
881 SlitClients::iterator it = m_client_list.begin(); 881 SlitClients::iterator it = m_client_list.begin();
882 for(it++; it != m_client_list.end(); it++) { 882 for(++it; it != m_client_list.end(); ++it) {
883 if ((*it) == client) { 883 if ((*it) == client) {
884 SlitClients::iterator prev = it; 884 SlitClients::iterator prev = it;
885 prev--; 885 prev--;
@@ -900,7 +900,7 @@ void Slit::clientDown(SlitClient* client) {
900 } 900 }
901 901
902 SlitClients::reverse_iterator it = m_client_list.rbegin(); 902 SlitClients::reverse_iterator it = m_client_list.rbegin();
903 for(it++; it != m_client_list.rend(); it++) { 903 for(++it; it != m_client_list.rend(); ++it) {
904 if ((*it) == client) { 904 if ((*it) == client) {
905 SlitClients::reverse_iterator next = it; 905 SlitClients::reverse_iterator next = it;
906 next--; 906 next--;