aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Font.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/FbTk/Font.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/FbTk/Font.cc')
-rw-r--r--src/FbTk/Font.cc4
1 files changed, 2 insertions, 2 deletions
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