HOPKINS: Fix some warnings reported by CppCheck

This commit is contained in:
Strangerke 2013-03-18 08:19:33 +01:00
parent 128fd022ab
commit de883e6198
4 changed files with 4 additions and 4 deletions

View File

@ -702,8 +702,8 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
}
}
_vm->_eventsManager._rateCounter = 0;
int soundNumber = 0;
if (!skipFl) {
int soundNumber = 0;
for (;;) {
++soundNumber;
_vm->_soundManager.playAnimSound(soundNumber);

View File

@ -2014,9 +2014,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) {
break;
arrDataIdx[DIR_UP] = 0;
arrLineIdx[DIR_UP] = -1;
if (arrDelta[DIR_UP] <= delta && arrLineIdx[DIR_UP] != -1)
break;
if (arrDelta[DIR_DOWN] <= delta && arrLineIdx[DIR_DOWN] != -1)
if ((arrDelta[DIR_UP] <= delta && arrLineIdx[DIR_UP] != -1) || (arrDelta[DIR_DOWN] <= delta && arrLineIdx[DIR_DOWN] != -1))
break;
}
arrDelta[DIR_UP] = delta;

View File

@ -36,6 +36,7 @@ private:
HopkinsEngine *_vm;
public:
MenuManager() {}
void setParent(HopkinsEngine *vm);
int menu();

View File

@ -54,6 +54,7 @@ private:
void syncSavegameData(Common::Serializer &s, int version);
void syncCharacterLocation(Common::Serializer &s, CharacterLocation &item);
public:
SaveLoadManager() {}
void setParent(HopkinsEngine *vm);
void initSaves();