Skip to content

Commit

Permalink
ILLUSIONS: Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jul 21, 2018
1 parent 99f458d commit e6b61c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions engines/illusions/duckman/menusystem_duckman.cpp
Expand Up @@ -361,7 +361,7 @@ int MenuActionUpdateSlider::calcNewSliderValue(int newOffset) {
int start = 0;
int end = 0;
int currentPosition = 0;
for (int i = 0; i < text.size(); i++) {
for (uint i = 0; i < text.size(); i++) {
switch (text[i]) {
case '{' : start = i; break;
case '}' : end = i; break;
Expand All @@ -386,7 +386,7 @@ int MenuActionUpdateSlider::calcNewSliderValue(int newOffset) {
void MenuActionUpdateSlider::setSliderValue(uint8 newValue) {
int start = 0;
Common::String text = _menuItem->getText();
for (int i = 0; i < text.size(); i++) {
for (uint i = 0; i < text.size(); i++) {
switch (text[i]) {
case '{' : start = i; break;
case '|' : text.setChar('~', i); break;
Expand Down
2 changes: 1 addition & 1 deletion engines/illusions/illusions.cpp
Expand Up @@ -64,7 +64,7 @@ namespace Illusions {
char *debugW2I(byte *wstr) {
static char buf[65];
char *p = buf;
int i = 0;
uint i = 0;
while (*wstr != 0 && i < sizeof(buf) - 1) {
*p++ = *wstr;
wstr += 2;
Expand Down
4 changes: 2 additions & 2 deletions engines/illusions/menusystem.cpp
Expand Up @@ -586,8 +586,8 @@ bool BaseMenuSystem::calcMenuItemTextPositionAtPoint(Common::Point pt, int &offs
Common::String text = menuItem->getText();
FontResource *font = _vm->_dict->findFont(_activeMenu->_fontId);

uint curX = 0;
for (int i = 0; i < text.size(); i++) {
int curX = 0;
for (uint i = 0; i < text.size(); i++) {
int16 w = font->getCharInfo(text[i])->_width;
if (x >= curX && x <= curX + w) {
offset = i;
Expand Down

0 comments on commit e6b61c3

Please sign in to comment.