summaryrefslogtreecommitdiff
path: root/riscos/window.c
diff options
context:
space:
mode:
authorSteve Fryatt <steve@stevefryatt.org.uk>2011-12-18 23:46:30 +0000
committerSteve Fryatt <steve@stevefryatt.org.uk>2011-12-18 23:46:30 +0000
commit7fb38a3e79e23639e335351c89a1adfde410eece (patch)
tree96eccdaf64652aa81dbd4fece79ffb88f79ff68f /riscos/window.c
parent433e1fd79655f0f8c7afd31c89ef43b7264f21e3 (diff)
downloadnetsurf-7fb38a3e79e23639e335351c89a1adfde410eece.tar.gz
netsurf-7fb38a3e79e23639e335351c89a1adfde410eece.tar.bz2
Lose unnecessary intermediate variable assignments.
svn path=/trunk/netsurf/; revision=13297
Diffstat (limited to 'riscos/window.c')
-rw-r--r--riscos/window.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 8dbfab639..0489a47c3 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -3128,43 +3128,40 @@ void ro_gui_window_scroll_action(struct gui_window *g,
if (!handled && g->bw->children == NULL) {
switch (step_x) {
case SCROLL_TOP:
- step_x = -0x10000000;
+ state.xscroll -= 0x10000000;
break;
case SCROLL_BOTTOM:
- step_x = 0x10000000;
+ state.xscroll += 0x10000000;
break;
case SCROLL_PAGE_UP:
- step_x = - visible_x;
+ state.xscroll -= visible_x;
break;
case SCROLL_PAGE_DOWN:
- step_x = visible_x;
+ state.xscroll += visible_x;
break;
default:
- step_x = 2 * step_x;
+ state.xscroll += 2 * step_x;
break;
}
switch (step_y) {
case SCROLL_TOP:
- step_y = 0x10000000;
+ state.yscroll += 0x10000000;
break;
case SCROLL_BOTTOM:
- step_y = -0x10000000;
+ state.yscroll -= 0x10000000;
break;
case SCROLL_PAGE_UP:
- step_y = visible_y;
+ state.yscroll += visible_y;
break;
case SCROLL_PAGE_DOWN:
- step_y = -visible_y;
+ state.yscroll -= visible_y;
break;
default:
- step_y = -2 * step_y;
+ state.yscroll -= 2 * step_y;
break;
}
- state.xscroll += step_x;
- state.yscroll += step_y;
-
error = xwimp_open_window((wimp_open *) &state);
if (error) {
LOG(("xwimp_open_window: 0x%x: %s",