diff options
author | alberth <alberth@openttd.org> | 2009-06-27 20:53:45 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-06-27 20:53:45 +0000 |
commit | 9b070b5405d11c74d89a747e912e627e39850f7c (patch) | |
tree | 5143dbacaa7e860b2253b091bd195f4e2d287efc /src/misc_gui.cpp | |
parent | 812ad41f23b7ed52a161ed15b15a2af3a7edb41f (diff) | |
download | openttd-9b070b5405d11c74d89a747e912e627e39850f7c.tar.xz |
(svn r16677) -Codechange: Dimension width and height are unsigned.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index bead99f04..4ebdb53ec 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -802,8 +802,8 @@ void GuiShowTooltips(StringID str, uint paramcount, const uint64 params[], bool * Clamp value to below main toolbar and above statusbar. If tooltip would * go below window, flip it so it is shown above the cursor */ int y = Clamp(_cursor.pos.y + _cursor.size.y + _cursor.offs.y + 5, 22, _screen.height - 12); - if (y + br.height > _screen.height - 12) y = _cursor.pos.y + _cursor.offs.y - br.height - 5; - int x = Clamp(_cursor.pos.x - (br.width >> 1), 0, _screen.width - br.width); + if (y + (int)br.height > _screen.height - 12) y = _cursor.pos.y + _cursor.offs.y - (int)br.height - 5; + int x = Clamp(_cursor.pos.x - (int)(br.width >> 1), 0, _screen.width - (int)br.width); const Widget *wid = InitializeWidgetArrayFromNestedWidgets(_nested_tooltips_widgets, lengthof(_nested_tooltips_widgets), _tooltips_widgets, &generated_tooltips_widgets); |