diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 1 | ||||
| -rw-r--r-- | src/Fl_Browser.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_Input_.cxx | 1 | ||||
| -rw-r--r-- | src/Fl_Menu.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Text_Buffer.cxx | 2 |
6 files changed, 9 insertions, 7 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index b29b7a260..417a0acca 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1306,6 +1306,7 @@ int Fl::handle_(int e, Fl_Window* window) case FL_UNFOCUS: window = 0; + // FALLTHROUGH case FL_FOCUS: fl_xfocus = window; fl_fix_focus(); diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx index 7621c6598..196796b97 100644 --- a/src/Fl_Browser.cxx +++ b/src/Fl_Browser.cxx @@ -511,7 +511,7 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const { char* str = l->txt; const int* i = column_widths(); - bool first = true; // for icon + bool firstLoop = true; // for icon while (W > 6) { // do each tab-separated field int w1 = W; // width for this field char* e = 0; // pointer to end of field or null if none @@ -520,8 +520,8 @@ void Fl_Browser::item_draw(void* item, int X, int Y, int W, int H) const { if (e) {*e = 0; w1 = *i++;} } // Icon drawing code - if (first) { - first = false; + if (firstLoop) { + firstLoop = false; if (l->icon) { l->icon->draw(X+2,Y+1); // leave 2px left, 1px above int iconw = l->icon->w()+2; diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 57226056d..426dbfd51 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -432,7 +432,8 @@ Fl_File_Chooser::count() { void Fl_File_Chooser::directory(const char *d)// I - Directory to change to { - char *dirptr; // Pointer into directory + char *dirptr; // Pointer into directory + char fixpath[FL_PATH_MAX]; // Path with slashes converted // printf("Fl_File_Chooser::directory(\"%s\")\n", d == NULL ? "(null)" : d); @@ -444,7 +445,6 @@ Fl_File_Chooser::directory(const char *d)// I - Directory to change to if (Fl::system_driver()->backslash_as_slash()) { // See if the filename contains backslashes... char *slash; // Pointer to slashes - char fixpath[FL_PATH_MAX]; // Path with slashes converted if (strchr(d, '\\')) { // Convert backslashes to slashes... strlcpy(fixpath, d, sizeof(fixpath)); diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 1ffc3c402..ef6900d6e 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1010,6 +1010,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { if (!(damage()&FL_DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;} } else //if (Fl::selection_owner() != this) minimal_update(mark_, position_); + // FALLTHROUGH case FL_HIDE: fl_reset_spot(); if (!readonly() && (when() & FL_WHEN_RELEASE)) diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index b51b4e040..3ab303dea 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -533,7 +533,7 @@ int menuwindow::find_selected(int mx, int my) { if (my < 0 || my >= h()) return -1; if (!itemheight) { // menubar int xx = 3; int n = 0; - const Fl_Menu_Item* m = menu ? menu->first() : 0; + const Fl_Menu_Item* m = menu->first(); for (; ; m = m->next(), n++) { if (!m->text) return -1; xx += m->measure(0, button) + 16; diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx index 6b46dd497..8df527b1b 100644 --- a/src/Fl_Text_Buffer.cxx +++ b/src/Fl_Text_Buffer.cxx @@ -1248,7 +1248,7 @@ void Fl_Text_Buffer::remove_(int start, int end) /* expand the gap to encompass the deleted characters */ mGapEnd += end - mGapStart; - mGapStart -= mGapStart - start; + mGapStart = start; /* update the length */ mLength -= end - start; |
