From 979756355244b3327a99a90a3e603168b1ba3e2e Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 27 Nov 2014 15:29:54 +0000 Subject: Improve code formatting according to CMP. Add one pair of braces for clarity, move some other braces and else statements around. There's more to that, but these were minimal changes to improve readability for solving STR #3043. There are no real code changes involved though. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Browser.cxx | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx index 09f6731cc..17ff1afbd 100644 --- a/src/Fl_File_Browser.cxx +++ b/src/Fl_File_Browser.cxx @@ -351,9 +351,8 @@ Fl_File_Browser::item_draw(void *p, // I - List item data else fl_color(fl_inactive(c)); - for (t = line->txt, ptr = fragment; *t != '\0'; t ++) - if (*t == '\n') - { + for (t = line->txt, ptr = fragment; *t != '\0'; t ++) { + if (*t == '\n') { // Newline - nul terminate this fragment and draw it... *ptr = '\0'; @@ -365,21 +364,18 @@ Fl_File_Browser::item_draw(void *p, // I - List item data width = 0; Y += fl_height(); column = 0; - } - else if (*t == column_char()) - { + } else if (*t == column_char()) { // Tab - nul terminate this fragment and draw it... *ptr = '\0'; int cW = W - width; // Clip width... - if (columns) - { - // Try clipping inside this column... + if (columns) { + // Try clipping inside this column... for (i = 0; i < column && columns[i]; i ++) { ; } - if (columns[i]) - cW = columns[i]; + if (columns[i]) + cW = columns[i]; } fl_draw(fragment, X + width, Y, cW, fl_height(), @@ -387,21 +383,18 @@ Fl_File_Browser::item_draw(void *p, // I - List item data // Advance to the next column... column ++; - if (columns) - { + if (columns) { for (i = 0, width = 0; i < column && columns[i]; i ++) width += columns[i]; } else - width = column * (int)(fl_height() * 0.6 * 8.0); - + width = column * (int)(fl_height() * 0.6 * 8.0); ptr = fragment; } else *ptr++ = *t; - - if (ptr > fragment) - { + } + if (ptr > fragment) { // Nul terminate this fragment and draw it... *ptr = '\0'; -- cgit v1.2.3