summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-06-01 11:43:36 +0000
committeralberth <alberth@openttd.org>2009-06-01 11:43:36 +0000
commitbab70a823dd810e1d4477f0c01d3a7b3e9b19ac8 (patch)
tree2668a1043fb310d44e67f4deb07871519d406a55 /src/widget.cpp
parent5e91bf0ad20e0c60b31e190a1f02f184020238de (diff)
downloadopenttd-bab70a823dd810e1d4477f0c01d3a7b3e9b19ac8.tar.xz
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 3375a3a2a..93f05dc15 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -141,12 +141,10 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
*/
int GetWidgetFromPos(const Window *w, int x, int y)
{
- uint index;
int found_index = -1;
- /* Go through the widgets and check if we find the widget that the coordinate is
- * inside. */
- for (index = 0; index < w->widget_count; index++) {
+ /* Go through the widgets and check if we find the widget that the coordinate is inside. */
+ for (uint index = 0; index < w->widget_count; index++) {
const Widget *wi = &w->widget[index];
if (wi->type == WWT_EMPTY || wi->type == WWT_FRAME) continue;