aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-14 23:22:01 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-14 23:22:01 (GMT)
commit2b62cf973318978bc222db7719552148275887db (patch)
tree71722be7f293a2433bfbc1de8b32d2ca338d8aa8 /src/FbTk
parentc6047e9ebab5a0551c866078ed29fdda1e6b8174 (diff)
downloadfluxbox-2b62cf973318978bc222db7719552148275887db.zip
fluxbox-2b62cf973318978bc222db7719552148275887db.tar.bz2
cleanup and code deduplication
* ClientPattern.cc: make compiler happy (complaints about XPROP not handled in switch) * FbTk/FbPixmap.cc FbTk/StringUtil.cc: signed vs unsigned * FbTk/FbString.cc: missing return * WinClient.cc: create atoms only once; use helper function * Window.cc: use a helper function
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbPixmap.cc2
-rw-r--r--src/FbTk/FbString.cc1
-rw-r--r--src/FbTk/StringUtil.cc2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index d63090e..a347e23 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -369,7 +369,7 @@ bool FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) {
369 return false; 369 return false;
370 370
371 checkAtoms(); 371 checkAtoms();
372 for (int i=0; i < sizeof(root_props)/sizeof(RootProps); ++i) { 372 for (size_t i = 0; i < sizeof(root_props)/sizeof(RootProps); ++i) {
373 if (root_props[i].atom == atom) { 373 if (root_props[i].atom == atom) {
374 Pixmap root_pm = None; 374 Pixmap root_pm = None;
375 Atom real_type; 375 Atom real_type;
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc
index 79b773a..fd34693 100644
--- a/src/FbTk/FbString.cc
+++ b/src/FbTk/FbString.cc
@@ -126,6 +126,7 @@ const FbString& BiDiString::setLogical(const FbString& logical) {
126 m_visual_dirty = true; 126 m_visual_dirty = true;
127 } 127 }
128#endif 128#endif
129 return m_logical;
129} 130}
130 131
131const FbString& BiDiString::visual() const { 132const FbString& BiDiString::visual() const {
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc
index 691b600..182233b 100644
--- a/src/FbTk/StringUtil.cc
+++ b/src/FbTk/StringUtil.cc
@@ -183,7 +183,7 @@ string findExtension(const string &filename) {
183string::size_type findCharFromAlphabetAfterTrigger(const std::string& in, char trigger, const char alphabet[], size_t len_alphabet, size_t* found) { 183string::size_type findCharFromAlphabetAfterTrigger(const std::string& in, char trigger, const char alphabet[], size_t len_alphabet, size_t* found) {
184 for (const char* s = in.c_str(); *s != '\0'; ) { 184 for (const char* s = in.c_str(); *s != '\0'; ) {
185 if (*s++ == trigger && *s != '\0') { 185 if (*s++ == trigger && *s != '\0') {
186 for (const char* a = alphabet; (a - alphabet) < len_alphabet; ++a) { 186 for (const char* a = alphabet; (a - alphabet) < static_cast<ssize_t>(len_alphabet); ++a) {
187 if (*s == *a) { 187 if (*s == *a) {
188 if (found) { 188 if (found) {
189 *found = a - alphabet; 189 *found = a - alphabet;