summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-24 16:28:34 +0000
committerDarkvater <darkvater@openttd.org>2006-10-24 16:28:34 +0000
commit1324835bc994f265dc6bb1fad2ec9f80e5ae06f0 (patch)
tree2116756e9b5fa74a6cd26cfc4f62a38931145b53
parent1e69ac550dcd81a16cf6e2cf56aa154e297a41d2 (diff)
downloadopenttd-1324835bc994f265dc6bb1fad2ec9f80e5ae06f0.tar.xz
(svn r6927) -Codechange: No need to explicitly cast a boolean to a boolean and move draw_default
goto outside of switch statement.
-rw-r--r--widget.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/widget.c b/widget.c
index ade6d0ded..eee94b4bd 100644
--- a/widget.c
+++ b/widget.c
@@ -296,11 +296,11 @@ void DrawWindowWidgets(const Window *w)
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
// draw up/down buttons
- clicked = !!((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_UP);
+ clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_UP);
DrawFrameRect(r.left, r.top, r.right, r.top + 9, wi->color, (clicked) ? FR_LOWERED : 0);
DoDrawString(UPARROW, r.left + 2 + clicked, r.top + clicked, 0x10);
- clicked = !!(((w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_DOWN));
+ clicked = (((w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_DOWN));
DrawFrameRect(r.left, r.bottom - 9, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0);
DoDrawString(DOWNARROW, r.left + 2 + clicked, r.bottom - 9 + clicked, 0x10);
@@ -328,11 +328,11 @@ void DrawWindowWidgets(const Window *w)
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
// draw up/down buttons
- clicked = !!((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_UP | WF_SCROLL2));
+ clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_UP | WF_SCROLL2));
DrawFrameRect(r.left, r.top, r.right, r.top + 9, wi->color, (clicked) ? FR_LOWERED : 0);
DoDrawString(UPARROW, r.left + 2 + clicked, r.top + clicked, 0x10);
- clicked = !!((w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_DOWN | WF_SCROLL2));
+ clicked = ((w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_DOWN | WF_SCROLL2));
DrawFrameRect(r.left, r.bottom - 9, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0);
DoDrawString(DOWNARROW, r.left + 2 + clicked, r.bottom - 9 + clicked, 0x10);
@@ -361,11 +361,11 @@ void DrawWindowWidgets(const Window *w)
assert(r.bottom - r.top == 11); // XXX - to ensure the same sizes are used everywhere!
- clicked = !!((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL)) == (WF_SCROLL_UP | WF_HSCROLL));
+ clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL)) == (WF_SCROLL_UP | WF_HSCROLL));
DrawFrameRect(r.left, r.top, r.left + 9, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0);
DrawSprite(SPR_ARROW_LEFT, r.left + 1 + clicked, r.top + 1 + clicked);
- clicked = !!((w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL)) == (WF_SCROLL_DOWN | WF_HSCROLL));
+ clicked = ((w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL)) == (WF_SCROLL_DOWN | WF_HSCROLL));
DrawFrameRect(r.right-9, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0);
DrawSprite(SPR_ARROW_RIGHT, r.right - 8 + clicked, r.top + 1 + clicked);