aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.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/fluxbox.cc
parentf859e78cb24cf69cc06e4395c58d804537f301c7 (diff)
downloadfluxbox_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/fluxbox.cc')
-rw-r--r--src/fluxbox.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 8260897..77b9881 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -382,7 +382,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
382 int scrnr = 0; 382 int scrnr = 0;
383 FbTk::StringUtil::stringtok(vals, m_argv[i], ",:"); 383 FbTk::StringUtil::stringtok(vals, m_argv[i], ",:");
384 for (vector<string>::iterator scrit = vals.begin(); 384 for (vector<string>::iterator scrit = vals.begin();
385 scrit != vals.end(); scrit++) { 385 scrit != vals.end(); ++scrit) {
386 scrnr = atoi(scrit->c_str()); 386 scrnr = atoi(scrit->c_str());
387 if (scrnr >= 0 && scrnr < ScreenCount(disp)) 387 if (scrnr >= 0 && scrnr < ScreenCount(disp))
388 scrtmp.push_back(scrnr); 388 scrtmp.push_back(scrnr);
@@ -711,7 +711,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
711 // most of them are handled in FluxboxWindow::handleEvent 711 // most of them are handled in FluxboxWindow::handleEvent
712 // but some special cases like ewmh propertys needs to be checked 712 // but some special cases like ewmh propertys needs to be checked
713 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 713 for (AtomHandlerContainerIt it= m_atomhandler.begin();
714 it != m_atomhandler.end(); it++) { 714 it != m_atomhandler.end(); ++it) {
715 if ( (*it)->propertyNotify(*winclient, e->xproperty.atom)) 715 if ( (*it)->propertyNotify(*winclient, e->xproperty.atom))
716 break; 716 break;
717 } 717 }
@@ -880,7 +880,7 @@ void Fluxbox::handleClientMessage(XClientMessageEvent &ce) {
880 // note: we dont need screen nor winclient to be non-null, 880 // note: we dont need screen nor winclient to be non-null,
881 // it's up to the atomhandler to check that 881 // it's up to the atomhandler to check that
882 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 882 for (AtomHandlerContainerIt it= m_atomhandler.begin();
883 it != m_atomhandler.end(); it++) { 883 it != m_atomhandler.end(); ++it) {
884 (*it)->checkClientMessage(ce, screen, winclient); 884 (*it)->checkClientMessage(ce, screen, winclient);
885 } 885 }
886 886
@@ -1042,7 +1042,7 @@ AtomHandler* Fluxbox::getAtomHandler(const string &name) {
1042 if ( name != "" ) { 1042 if ( name != "" ) {
1043 1043
1044 AtomHandlerContainerIt it; 1044 AtomHandlerContainerIt it;
1045 for (it = m_atomhandler.begin(); it != m_atomhandler.end(); it++) { 1045 for (it = m_atomhandler.begin(); it != m_atomhandler.end(); ++it) {
1046 if (name == (*it)->getName()) 1046 if (name == (*it)->getName())
1047 return *it; 1047 return *it;
1048 } 1048 }
@@ -1258,7 +1258,7 @@ void Fluxbox::load_rc(BScreen &screen) {
1258 StringUtil::removeFirstWhitespace(values); 1258 StringUtil::removeFirstWhitespace(values);
1259 StringUtil::stringtok<BScreen::WorkspaceNames>(names, values, ","); 1259 StringUtil::stringtok<BScreen::WorkspaceNames>(names, values, ",");
1260 BScreen::WorkspaceNames::iterator it; 1260 BScreen::WorkspaceNames::iterator it;
1261 for(it = names.begin(); it != names.end(); it++) { 1261 for(it = names.begin(); it != names.end(); ++it) {
1262 if (!(*it).empty() && (*it) != "") 1262 if (!(*it).empty() && (*it) != "")
1263 screen.addWorkspaceName((*it).c_str()); 1263 screen.addWorkspaceName((*it).c_str());
1264 } 1264 }
@@ -1385,7 +1385,7 @@ void Fluxbox::focusedWindowChanged(BScreen &screen,
1385 WinClient* client) { 1385 WinClient* client) {
1386 1386
1387 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 1387 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1388 it != m_atomhandler.end(); it++) { 1388 it != m_atomhandler.end(); ++it) {
1389 (*it)->updateFocusedWindow(screen, client ? client->window() : 0 ); 1389 (*it)->updateFocusedWindow(screen, client ? client->window() : 0 );
1390 } 1390 }
1391} 1391}