diff options
author | Strangerke | 2016-08-20 10:17:53 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 58d1bcc3e7f7aca20b1db3bef019f742ebd6c474 (patch) | |
tree | 630217ecad0823416d82fbff36ea2bf7b95e8c82 /engines | |
parent | a5b8085c48f11dde20e090b063c3c9558d5f6c66 (diff) | |
download | scummvm-rg350-58d1bcc3e7f7aca20b1db3bef019f742ebd6c474.tar.gz scummvm-rg350-58d1bcc3e7f7aca20b1db3bef019f742ebd6c474.tar.bz2 scummvm-rg350-58d1bcc3e7f7aca20b1db3bef019f742ebd6c474.zip |
DM: Silent a couple of CppCheck warnings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dm/champion.cpp | 2 | ||||
-rw-r--r-- | engines/dm/dialog.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index 6e92915851..caf61ef629 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -721,7 +721,6 @@ int16 ChampionMan::f321_addPendingDamageAndWounds_getDamage(int16 champIndex, in if (!curChampion->_currHealth) return 0; - bool skipScaling = false; if (attackType != k0_attackType_NORMAL) { uint16 defense = 0; uint16 woundCount = 0; @@ -734,6 +733,7 @@ int16 ChampionMan::f321_addPendingDamageAndWounds_getDamage(int16 champIndex, in if (woundCount) defense /= woundCount; + bool skipScaling = false; switch (attackType) { case k6_attackType_PSYCHIC: { diff --git a/engines/dm/dialog.cpp b/engines/dm/dialog.cpp index 900ff76df6..53513b7e7a 100644 --- a/engines/dm/dialog.cpp +++ b/engines/dm/dialog.cpp @@ -154,7 +154,7 @@ bool DialogMan::f426_isMessageOnTwoLines(char* str, char* part1, char* part2) { strcpy(part1, str); uint16 splitPosition = strLength >> 1; - while ((part1[splitPosition] != ' ') && (splitPosition < strLength)) + while ((splitPosition < strLength) && (part1[splitPosition] != ' ')) splitPosition++; part1[splitPosition] = '\0'; |