aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceNameTool.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/WorkspaceNameTool.cc
parentf859e78cb24cf69cc06e4395c58d804537f301c7 (diff)
downloadfluxbox_paul-5ae8bdf49db36b2691ce545e3285f9ee64f92148.zip
fluxbox_paul-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/WorkspaceNameTool.cc')
-rw-r--r--src/WorkspaceNameTool.cc4
1 files changed, 2 insertions, 2 deletions
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