summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-27 21:41:00 +0000
committerrubidium <rubidium@openttd.org>2008-05-27 21:41:00 +0000
commit5c5ee7eb579d0ee6655e0b81f6169dca7632ab97 (patch)
tree086ec523744482fc8374da46db2a402e4b5c5d0a /src/widgets
parent49a0bd7f90f3c48f81e9ad0bcabe87a77cf36e0f (diff)
downloadopenttd-5c5ee7eb579d0ee6655e0b81f6169dca7632ab97.tar.xz
(svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings.
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index c16e4a367..d0c5d04b7 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -274,7 +274,7 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u
} else {
/* ... and lastly if it won't, enable the scroll bar and fit the
* list in below the widget */
- int avg_height = list_height / list->size();
+ int avg_height = list_height / (int)list->size();
int rows = (screen_bottom - 4 - top) / avg_height;
height = rows * avg_height;
scroll = true;
@@ -306,8 +306,8 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u
dw->widget[0].right -= 12;
/* Capacity is the average number of items visible */
- dw->vscroll.cap = height * list->size() / list_height;
- dw->vscroll.count = list->size();
+ dw->vscroll.cap = height * (uint16)list->size() / list_height;
+ dw->vscroll.count = (uint16)list->size();
}
dw->desc_flags = WDF_DEF_WIDGET;