ILLUSIONS: Fix warnings

This commit is contained in:
Eugene Sandulenko 2018-07-21 12:14:52 +02:00
parent 99f458dafa
commit e6b61c3874
3 changed files with 5 additions and 5 deletions

View File

@ -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;
@ -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;

View File

@ -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;

View File

@ -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;