aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TypeAhead.hh
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/TypeAhead.hh
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/FbTk/TypeAhead.hh')
-rw-r--r--src/FbTk/TypeAhead.hh6
1 files changed, 3 insertions, 3 deletions
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 }