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 | |
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')
-rw-r--r-- | src/FbCommands.cc | 4 | ||||
-rw-r--r-- | src/FbTk/Font.cc | 4 | ||||
-rw-r--r-- | src/FbTk/ImageImlib2.cc | 2 | ||||
-rw-r--r-- | src/FbTk/Menu.cc | 2 | ||||
-rw-r--r-- | src/FbTk/STLUtil.hh | 2 | ||||
-rw-r--r-- | src/FbTk/Timer.cc | 2 | ||||
-rw-r--r-- | src/FbTk/TypeAhead.hh | 6 | ||||
-rw-r--r-- | src/FocusableList.cc | 2 | ||||
-rw-r--r-- | src/Keys.cc | 2 | ||||
-rw-r--r-- | src/Remember.cc | 8 | ||||
-rw-r--r-- | src/Screen.cc | 4 | ||||
-rw-r--r-- | src/Slit.cc | 4 | ||||
-rw-r--r-- | src/Window.cc | 4 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 10 | ||||
-rw-r--r-- | src/WorkspaceNameTool.cc | 4 | ||||
-rw-r--r-- | src/fluxbox.cc | 12 |
16 files changed, 36 insertions, 36 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 63aa79d..b0289b8 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -512,7 +512,7 @@ void DeiconifyCmd::execute() { | |||
512 | 512 | ||
513 | case ALL: | 513 | case ALL: |
514 | case ALLWORKSPACE: | 514 | case ALLWORKSPACE: |
515 | for(; it != itend; it++) { | 515 | for(; it != itend; ++it) { |
516 | old_workspace_num= (*it)->workspaceNumber(); | 516 | old_workspace_num= (*it)->workspaceNumber(); |
517 | if (m_mode == ALL || old_workspace_num == workspace_num || | 517 | if (m_mode == ALL || old_workspace_num == workspace_num || |
518 | (*it)->isStuck()) { | 518 | (*it)->isStuck()) { |
@@ -526,7 +526,7 @@ void DeiconifyCmd::execute() { | |||
526 | case LAST: | 526 | case LAST: |
527 | case LASTWORKSPACE: | 527 | case LASTWORKSPACE: |
528 | default: | 528 | default: |
529 | for (; it != itend; it++) { | 529 | for (; it != itend; ++it) { |
530 | old_workspace_num= (*it)->workspaceNumber(); | 530 | old_workspace_num= (*it)->workspaceNumber(); |
531 | if(m_mode == LAST || old_workspace_num == workspace_num || | 531 | if(m_mode == LAST || old_workspace_num == workspace_num || |
532 | (*it)->isStuck()) { | 532 | (*it)->isStuck()) { |
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc index f06e6f6..37621a8 100644 --- a/src/FbTk/Font.cc +++ b/src/FbTk/Font.cc | |||
@@ -117,7 +117,7 @@ void Font::shutdown() { | |||
117 | FontImp* font = fit->second; | 117 | FontImp* font = fit->second; |
118 | if (font) { | 118 | if (font) { |
119 | FontCacheIt it; | 119 | FontCacheIt it; |
120 | for (it = fit; it != font_cache.end(); it++) | 120 | for (it = fit; it != font_cache.end(); ++it) |
121 | if (it->second == font) | 121 | if (it->second == font) |
122 | it->second = 0; | 122 | it->second = 0; |
123 | delete font; | 123 | delete font; |
@@ -181,7 +181,7 @@ bool Font::load(const string &name) { | |||
181 | FbTk::StringUtil::stringtok<StringList>(names, name, "|"); | 181 | FbTk::StringUtil::stringtok<StringList>(names, name, "|"); |
182 | 182 | ||
183 | StringListIt name_it; | 183 | StringListIt name_it; |
184 | for (name_it = names.begin(); name_it != names.end(); name_it++) { | 184 | for (name_it = names.begin(); name_it != names.end(); ++name_it) { |
185 | FbTk::StringUtil::removeTrailingWhitespace(*name_it); | 185 | FbTk::StringUtil::removeTrailingWhitespace(*name_it); |
186 | FbTk::StringUtil::removeFirstWhitespace(*name_it); | 186 | FbTk::StringUtil::removeFirstWhitespace(*name_it); |
187 | 187 | ||
diff --git a/src/FbTk/ImageImlib2.cc b/src/FbTk/ImageImlib2.cc index 21202a1..af103bd 100644 --- a/src/FbTk/ImageImlib2.cc +++ b/src/FbTk/ImageImlib2.cc | |||
@@ -36,7 +36,7 @@ public: | |||
36 | 36 | ||
37 | std::map<int, Imlib_Context>::iterator it = this->begin(); | 37 | std::map<int, Imlib_Context>::iterator it = this->begin(); |
38 | std::map<int, Imlib_Context>::iterator it_end = this->end(); | 38 | std::map<int, Imlib_Context>::iterator it_end = this->end(); |
39 | for (; it != it_end; it++) { | 39 | for (; it != it_end; ++it) { |
40 | imlib_context_free(it->second); | 40 | imlib_context_free(it->second); |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 40f81c8..671d32a 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -1361,7 +1361,7 @@ void Menu::resetTypeAhead() { | |||
1361 | m_type_ahead.reset(); | 1361 | m_type_ahead.reset(); |
1362 | m_matches.clear(); | 1362 | m_matches.clear(); |
1363 | 1363 | ||
1364 | for (; it != vec.end(); it++) | 1364 | for (; it != vec.end(); ++it) |
1365 | clearItem((*it)->getIndex(), true, 1); | 1365 | clearItem((*it)->getIndex(), true, 1); |
1366 | } | 1366 | } |
1367 | 1367 | ||
diff --git a/src/FbTk/STLUtil.hh b/src/FbTk/STLUtil.hh index b1007f7..abc5472 100644 --- a/src/FbTk/STLUtil.hh +++ b/src/FbTk/STLUtil.hh | |||
@@ -85,7 +85,7 @@ F forAllIf(C& c, I i, F f) { | |||
85 | typedef typename C::iterator iterator; | 85 | typedef typename C::iterator iterator; |
86 | iterator it = c.begin(); | 86 | iterator it = c.begin(); |
87 | iterator end = c.end(); | 87 | iterator end = c.end(); |
88 | for (; it != end; it++) { | 88 | for (; it != end; ++it) { |
89 | if (i(*it)) | 89 | if (i(*it)) |
90 | f(*it); | 90 | f(*it); |
91 | } | 91 | } |
diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc index f34db08..8b144db 100644 --- a/src/FbTk/Timer.cc +++ b/src/FbTk/Timer.cc | |||
@@ -189,7 +189,7 @@ void Timer::updateTimers(int fd) { | |||
189 | 189 | ||
190 | time_t delta = last_time - now.tv_sec; | 190 | time_t delta = last_time - now.tv_sec; |
191 | 191 | ||
192 | for (it = m_timerlist.begin(); it != m_timerlist.end(); it++) { | 192 | for (it = m_timerlist.begin(); it != m_timerlist.end(); ++it) { |
193 | (*it)->m_start.tv_sec -= delta; | 193 | (*it)->m_start.tv_sec -= delta; |
194 | } | 194 | } |
195 | } | 195 | } |
diff --git a/src/FbTk/TypeAhead.hh b/src/FbTk/TypeAhead.hh index cac90a5..289587a 100644 --- a/src/FbTk/TypeAhead.hh +++ b/src/FbTk/TypeAhead.hh | |||
@@ -113,7 +113,7 @@ private: | |||
113 | Items const *m_ref; // reference to vector we are operating on | 113 | Items const *m_ref; // reference to vector we are operating on |
114 | 114 | ||
115 | void fillValues(BaseItems const &search, Items &fillin) const { | 115 | void fillValues(BaseItems const &search, Items &fillin) const { |
116 | for (BaseItemscIt it = search.begin(); it != search.end(); it++) { | 116 | for (BaseItemscIt it = search.begin(); it != search.end(); ++it) { |
117 | Item_Type tmp = dynamic_cast<Item_Type>(*it); | 117 | Item_Type tmp = dynamic_cast<Item_Type>(*it); |
118 | if (tmp) | 118 | if (tmp) |
119 | fillin.push_back(tmp); | 119 | fillin.push_back(tmp); |
@@ -153,7 +153,7 @@ private: | |||
153 | // iteration based on original list of items | 153 | // iteration based on original list of items |
154 | void doSearch(char to_test, Items const &items, | 154 | void doSearch(char to_test, Items const &items, |
155 | SearchResult &mySearchResult) const { | 155 | SearchResult &mySearchResult) const { |
156 | for (ItemscIt it = items.begin(); it != items.end(); it++) { | 156 | for (ItemscIt it = items.begin(); it != items.end(); ++it) { |
157 | if ((*it)->iTypeCompareChar(to_test, stringSize()) && (*it)->isEnabled()) | 157 | if ((*it)->iTypeCompareChar(to_test, stringSize()) && (*it)->isEnabled()) |
158 | mySearchResult.add(*it); | 158 | mySearchResult.add(*it); |
159 | } | 159 | } |
@@ -162,7 +162,7 @@ private: | |||
162 | // iteration based on last SearchResult | 162 | // iteration based on last SearchResult |
163 | void doSearch(char to_test, BaseItems const &search, | 163 | void doSearch(char to_test, BaseItems const &search, |
164 | SearchResult &mySearchResult) const { | 164 | SearchResult &mySearchResult) const { |
165 | for (BaseItemscIt it = search.begin(); it != search.end(); it++) { | 165 | for (BaseItemscIt it = search.begin(); it != search.end(); ++it) { |
166 | if ((*it)->iTypeCompareChar(to_test, stringSize()) && (*it)->isEnabled()) | 166 | if ((*it)->iTypeCompareChar(to_test, stringSize()) && (*it)->isEnabled()) |
167 | mySearchResult.add(*it); | 167 | mySearchResult.add(*it); |
168 | } | 168 | } |
diff --git a/src/FocusableList.cc b/src/FocusableList.cc index 382a6f5..87c5bcc 100644 --- a/src/FocusableList.cc +++ b/src/FocusableList.cc | |||
@@ -169,7 +169,7 @@ bool FocusableList::insertFromParent(Focusable &win) { | |||
169 | Focusables::iterator our_it = m_list.begin(), our_it_end = m_list.end(); | 169 | Focusables::iterator our_it = m_list.begin(), our_it_end = m_list.end(); |
170 | // walk through our list looking for corresponding entries in | 170 | // walk through our list looking for corresponding entries in |
171 | // parent's list, until we find the window that moved | 171 | // parent's list, until we find the window that moved |
172 | for (; our_it != our_it_end && p_it != p_it_end; p_it++) { | 172 | for (; our_it != our_it_end && p_it != p_it_end; ++p_it) { |
173 | if (*p_it == &win) { | 173 | if (*p_it == &win) { |
174 | if (*our_it == &win) // win didn't move in our list | 174 | if (*our_it == &win) // win didn't move in our list |
175 | return false; | 175 | return false; |
diff --git a/src/Keys.cc b/src/Keys.cc index fc53353..f91c92e 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -146,7 +146,7 @@ public: | |||
146 | // t_key ctor sets context_ of 0 to GLOBAL, so we must here too | 146 | // t_key ctor sets context_ of 0 to GLOBAL, so we must here too |
147 | context_ = context_ ? context_ : GLOBAL; | 147 | context_ = context_ ? context_ : GLOBAL; |
148 | keylist_t::iterator it = keylist.begin(), it_end = keylist.end(); | 148 | keylist_t::iterator it = keylist.begin(), it_end = keylist.end(); |
149 | for (; it != it_end; it++) { | 149 | for (; it != it_end; ++it) { |
150 | if (*it && (*it)->type == type_ && (*it)->key == key_ && | 150 | if (*it && (*it)->type == type_ && (*it)->key == key_ && |
151 | ((*it)->context & context_) > 0 && | 151 | ((*it)->context & context_) > 0 && |
152 | isdouble_ == (*it)->isdouble && (*it)->mod == | 152 | isdouble_ == (*it)->isdouble && (*it)->mod == |
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; |
diff --git a/src/Screen.cc b/src/Screen.cc index 309ee0d..4ea7afb 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1981,9 +1981,9 @@ void BScreen::clearHeads() { | |||
1981 | if (!hasXinerama()) return; | 1981 | if (!hasXinerama()) return; |
1982 | 1982 | ||
1983 | for (Workspaces::iterator i = m_workspaces_list.begin(); | 1983 | for (Workspaces::iterator i = m_workspaces_list.begin(); |
1984 | i != m_workspaces_list.end(); i++) { | 1984 | i != m_workspaces_list.end(); ++i) { |
1985 | for (Workspace::Windows::iterator win = (*i)->windowList().begin(); | 1985 | for (Workspace::Windows::iterator win = (*i)->windowList().begin(); |
1986 | win != (*i)->windowList().end(); win++) { | 1986 | win != (*i)->windowList().end(); ++win) { |
1987 | 1987 | ||
1988 | FluxboxWindow& w = *(*win); | 1988 | FluxboxWindow& w = *(*win); |
1989 | 1989 | ||
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--; |
diff --git a/src/Window.cc b/src/Window.cc index db5bacc..a4eef44 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1345,7 +1345,7 @@ void FluxboxWindow::iconify() { | |||
1345 | WinClient &client = *(*client_it); | 1345 | WinClient &client = *(*client_it); |
1346 | WinClient::TransientList::iterator it = client.transientList().begin(); | 1346 | WinClient::TransientList::iterator it = client.transientList().begin(); |
1347 | WinClient::TransientList::iterator it_end = client.transientList().end(); | 1347 | WinClient::TransientList::iterator it_end = client.transientList().end(); |
1348 | for (; it != it_end; it++) | 1348 | for (; it != it_end; ++it) |
1349 | if ((*it)->fbwindow()) | 1349 | if ((*it)->fbwindow()) |
1350 | (*it)->fbwindow()->iconify(); | 1350 | (*it)->fbwindow()->iconify(); |
1351 | } | 1351 | } |
@@ -2966,7 +2966,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { | |||
2966 | Workspace::Windows::iterator it_end = wins.end(); | 2966 | Workspace::Windows::iterator it_end = wins.end(); |
2967 | 2967 | ||
2968 | unsigned int bw; | 2968 | unsigned int bw; |
2969 | for (; it != it_end; it++) { | 2969 | for (; it != it_end; ++it) { |
2970 | if ((*it) == this) | 2970 | if ((*it) == this) |
2971 | continue; // skip myself | 2971 | continue; // skip myself |
2972 | 2972 | ||
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index 34c8f9a..42cc05e 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -393,7 +393,7 @@ void ArrangeWindowsCmd::execute() { | |||
393 | 393 | ||
394 | Workspace::Windows normal_windows; | 394 | Workspace::Windows normal_windows; |
395 | Workspace::Windows shaded_windows; | 395 | Workspace::Windows shaded_windows; |
396 | for(win = space->windowList().begin(); win != space->windowList().end(); win++) { | 396 | for(win = space->windowList().begin(); win != space->windowList().end(); ++win) { |
397 | int winhead = screen->getHead((*win)->fbWindow()); | 397 | int winhead = screen->getHead((*win)->fbWindow()); |
398 | if ((winhead == head || winhead == 0) && m_pat.match(**win)) { | 398 | if ((winhead == head || winhead == 0) && m_pat.match(**win)) { |
399 | if ((*win)->isShaded()) | 399 | if ((*win)->isShaded()) |
@@ -430,7 +430,7 @@ void ArrangeWindowsCmd::execute() { | |||
430 | // TODO: until i resolve the shadedwindow->moveResize() issue to place | 430 | // TODO: until i resolve the shadedwindow->moveResize() issue to place |
431 | // them in the same columns as the normal windows i just place the shaded | 431 | // them in the same columns as the normal windows i just place the shaded |
432 | // windows unchanged ontop of the current head | 432 | // windows unchanged ontop of the current head |
433 | for (i = 0, win = shaded_windows.begin(); win != shaded_windows.end(); win++, i++) { | 433 | for (i = 0, win = shaded_windows.begin(); win != shaded_windows.end(); ++win, ++i) { |
434 | if (i & 1) | 434 | if (i & 1) |
435 | (*win)->move(x_offs, y_offs); | 435 | (*win)->move(x_offs, y_offs); |
436 | else | 436 | else |
@@ -449,7 +449,7 @@ void ArrangeWindowsCmd::execute() { | |||
449 | // Resizes and sets windows positions in columns and rows. | 449 | // Resizes and sets windows positions in columns and rows. |
450 | for (i = 0; i < rows; ++i) { | 450 | for (i = 0; i < rows; ++i) { |
451 | x_offs = screen->maxLeft(head); | 451 | x_offs = screen->maxLeft(head); |
452 | for (j = 0; j < cols && normal_windows.size() > 0; ++j) { | 452 | for (j = 0; j < cols && !normal_windows.empty(); ++j) { |
453 | 453 | ||
454 | 454 | ||
455 | int cell_center_x = x_offs + (x_offs + cal_width) / 2; | 455 | int cell_center_x = x_offs + (x_offs + cal_width) / 2; |
@@ -457,7 +457,7 @@ void ArrangeWindowsCmd::execute() { | |||
457 | unsigned int closest_dist = ~0; | 457 | unsigned int closest_dist = ~0; |
458 | 458 | ||
459 | Workspace::Windows::iterator closest = normal_windows.end(); | 459 | Workspace::Windows::iterator closest = normal_windows.end(); |
460 | for (win = normal_windows.begin(); win != normal_windows.end(); win++) { | 460 | for (win = normal_windows.begin(); win != normal_windows.end(); ++win) { |
461 | 461 | ||
462 | int win_center_x = (*win)->frame().x() + ((*win)->frame().x() + (*win)->frame().width() / 2); | 462 | int win_center_x = (*win)->frame().x() + ((*win)->frame().x() + (*win)->frame().width() / 2); |
463 | int win_center_y = (*win)->frame().y() + ((*win)->frame().y() + (*win)->frame().height() / 2); | 463 | int win_center_y = (*win)->frame().y() + ((*win)->frame().y() + (*win)->frame().height() / 2); |
@@ -519,7 +519,7 @@ void ShowDesktopCmd::execute() { | |||
519 | BScreen::Icons icon_list = screen->iconList(); | 519 | BScreen::Icons icon_list = screen->iconList(); |
520 | BScreen::Icons::reverse_iterator iconit = icon_list.rbegin(); | 520 | BScreen::Icons::reverse_iterator iconit = icon_list.rbegin(); |
521 | BScreen::Icons::reverse_iterator itend= icon_list.rend(); | 521 | BScreen::Icons::reverse_iterator itend= icon_list.rend(); |
522 | for(; iconit != itend; iconit++) { | 522 | for(; iconit != itend; ++iconit) { |
523 | if ((*iconit)->workspaceNumber() == space || (*iconit)->isStuck()) | 523 | if ((*iconit)->workspaceNumber() == space || (*iconit)->isStuck()) |
524 | (*iconit)->deiconify(false); | 524 | (*iconit)->deiconify(false); |
525 | } | 525 | } |
diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc index 84f62e5..5056a8f 100644 --- a/src/WorkspaceNameTool.cc +++ b/src/WorkspaceNameTool.cc | |||
@@ -88,7 +88,7 @@ unsigned int WorkspaceNameTool::width() const { | |||
88 | 88 | ||
89 | const BScreen::Workspaces& workspaces = m_screen.getWorkspacesList(); | 89 | const BScreen::Workspaces& workspaces = m_screen.getWorkspacesList(); |
90 | BScreen::Workspaces::const_iterator it; | 90 | BScreen::Workspaces::const_iterator it; |
91 | for (it = workspaces.begin(); it != workspaces.end(); it++) { | 91 | for (it = workspaces.begin(); it != workspaces.end(); ++it) { |
92 | max_size = std::max(m_theme->font().textWidth((*it)->name()), max_size); | 92 | max_size = std::max(m_theme->font().textWidth((*it)->name()), max_size); |
93 | } | 93 | } |
94 | // so align text dont cut the last character | 94 | // so align text dont cut the last character |
@@ -104,7 +104,7 @@ unsigned int WorkspaceNameTool::height() const { | |||
104 | unsigned int max_size = 0; | 104 | unsigned int max_size = 0; |
105 | const BScreen::Workspaces& workspaces = m_screen.getWorkspacesList(); | 105 | const BScreen::Workspaces& workspaces = m_screen.getWorkspacesList(); |
106 | BScreen::Workspaces::const_iterator it; | 106 | BScreen::Workspaces::const_iterator it; |
107 | for (it = workspaces.begin(); it != workspaces.end(); it++) { | 107 | for (it = workspaces.begin(); it != workspaces.end(); ++it) { |
108 | max_size = std::max(m_theme->font().textWidth((*it)->name()), max_size); | 108 | max_size = std::max(m_theme->font().textWidth((*it)->name()), max_size); |
109 | } | 109 | } |
110 | // so align text dont cut the last character | 110 | // so align text dont cut the last character |
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 | } |