diff options
author | Eugene Sandulenko | 2016-02-14 15:25:44 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:13:25 +0100 |
commit | 499519fec3820d5f5ad377953560c321ac3efcab (patch) | |
tree | 396f8eeab07609528544f72d4c7337cccd0d0d65 /engines/wage/dialog.cpp | |
parent | eef56e167e481e413bd4c616e7c915e834c74726 (diff) | |
download | scummvm-rg350-499519fec3820d5f5ad377953560c321ac3efcab.tar.gz scummvm-rg350-499519fec3820d5f5ad377953560c321ac3efcab.tar.bz2 scummvm-rg350-499519fec3820d5f5ad377953560c321ac3efcab.zip |
WAGE: Fix int/uint comparison
Diffstat (limited to 'engines/wage/dialog.cpp')
-rw-r--r-- | engines/wage/dialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp index d98af304cb..263570bddc 100644 --- a/engines/wage/dialog.cpp +++ b/engines/wage/dialog.cpp @@ -59,7 +59,7 @@ enum { kDialogHeight = 113 }; -Dialog::Dialog(Gui *gui, int width, const char *text, DialogButtonArray *buttons, int defaultButton) : +Dialog::Dialog(Gui *gui, int width, const char *text, DialogButtonArray *buttons, uint defaultButton) : _gui(gui), _text(text), _buttons(buttons), _defaultButton(defaultButton) { assert(_gui->_engine); assert(_gui->_engine->_world); @@ -78,7 +78,7 @@ Dialog::Dialog(Gui *gui, int width, const char *text, DialogButtonArray *buttons _mouseOverPressedButton = false; // Adjust button positions - for (int i = 0; i < _buttons->size(); i++) + for (uint i = 0; i < _buttons->size(); i++) _buttons->operator[](i)->bounds.translate(_bbox.left, _bbox.top); _needsRedraw = true; @@ -98,7 +98,7 @@ void Dialog::paint() { static int boxOutline[] = { 1, 0, 0, 1, 1 }; drawOutline(_bbox, boxOutline, ARRAYSIZE(boxOutline)); - for (int i = 0; i < _buttons->size(); i++) { + for (uint i = 0; i < _buttons->size(); i++) { DialogButton *button = _buttons->operator[](i); static int buttonOutline[] = { 0, 0, 0, 0, 1 }; @@ -110,7 +110,7 @@ void Dialog::paint() { int color = kColorBlack; - if (i == _pressedButton && _mouseOverPressedButton) { + if ((int)i == _pressedButton && _mouseOverPressedButton) { Common::Rect bb(button->bounds.left + 5, button->bounds.top + 5, button->bounds.right - 5, button->bounds.bottom - 5); @@ -195,7 +195,7 @@ int Dialog::run() { } int Dialog::matchButton(int x, int y) { - for (int i = 0; i < _buttons->size(); i++) + for (uint i = 0; i < _buttons->size(); i++) if (_buttons->operator[](i)->bounds.contains(x, y)) return i; |