diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-05-26 11:14:18 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-05-26 11:14:18 +0100 |
commit | 4a28b2b170f746ebb9f73375237f7e291a50ca4c (patch) | |
tree | 1416523e57f1245707e461fd7b18b9f3abfc9128 /riscos/gui | |
parent | 02ac6b1976ab0d26b4812a3dd221ff90df580f1f (diff) | |
download | netsurf-4a28b2b170f746ebb9f73375237f7e291a50ca4c.tar.gz netsurf-4a28b2b170f746ebb9f73375237f7e291a50ca4c.tar.bz2 |
Scopre reduce some variables.
Diffstat (limited to 'riscos/gui')
-rw-r--r-- | riscos/gui/button_bar.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/riscos/gui/button_bar.c b/riscos/gui/button_bar.c index bfd288246..8602787a5 100644 --- a/riscos/gui/button_bar.c +++ b/riscos/gui/button_bar.c @@ -483,7 +483,6 @@ bool ro_gui_button_bar_icon_update(struct button_bar *button_bar) wimp_icon_create icon; struct button_bar_button *button, *b; os_error *error; - bool on_bar; if (button_bar == NULL || button_bar->window == NULL) @@ -492,7 +491,7 @@ bool ro_gui_button_bar_icon_update(struct button_bar *button_bar) button = button_bar->buttons; while (button != NULL) { - on_bar = false; + bool on_bar = false; /* Check if the icon is currently on the bar. */ @@ -720,8 +719,6 @@ bool ro_gui_button_bar_click(struct button_bar *button_bar, struct button_bar_button *button; os_coord pos; os_box box; - os_error *error; - char *sprite; if (button_bar == NULL || button_bar->hidden) return false; @@ -746,6 +743,8 @@ bool ro_gui_button_bar_click(struct button_bar *button_bar, if (button != NULL && (!button->shaded || drag_separator || button_bar->edit_source != NULL)) { + char *sprite; + os_error *error; drag_start = button_bar; drag_opt = button->opt_key; @@ -1186,7 +1185,6 @@ struct button_bar_button *ro_gui_button_bar_find_coords( bool *separator, bool *right) { struct button_bar_button *button; - int x0, y0, x1, y1; if (button_bar == NULL) return NULL; @@ -1195,6 +1193,7 @@ struct button_bar_button *ro_gui_button_bar_find_coords( while (button != NULL) { /* Match button extents. */ + int x0, y0, x1, y1; x0 = button_bar->extent.x0 + button->x_pos; y0 = button_bar->extent.y0 + button->y_pos; |