mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 09:26:26 +00:00
DGDS: Fix small issues identified by Coverity
This commit is contained in:
parent
63a39add0a
commit
e20d66ffed
@ -393,7 +393,7 @@ bool Console::cmdScriptDump(int argc, const char **argv) {
|
||||
break;
|
||||
case 0x1500:
|
||||
printOp(--indent, "ELSE / Skip to end-if");
|
||||
break;
|
||||
break;
|
||||
case 0x1510:
|
||||
printOp(--indent, "END IF");
|
||||
break;
|
||||
@ -466,6 +466,8 @@ bool Console::cmdScriptDump(int argc, const char **argv) {
|
||||
debugPrintf("\n");
|
||||
}
|
||||
|
||||
delete resStream;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
static const PlainGameDescriptor dgdsGames[] = {
|
||||
{"dgds", "Dynamix DGDS game"},
|
||||
{"rise", "Rise of the Dragon"},
|
||||
{"china", "Heart of China"},
|
||||
{"beamish", "The Adventures of Willy Beamish"},
|
||||
|
@ -1087,7 +1087,7 @@ void SDSScene::freeDialogData(uint16 num) {
|
||||
if (!num)
|
||||
return;
|
||||
|
||||
for (uint i = 0; i < _dialogs.size(); i++) {
|
||||
for (int i = 0; i < (int)_dialogs.size(); i++) {
|
||||
if (_dialogs[i]._num == num) {
|
||||
_dialogs.remove_at(i);
|
||||
i--;
|
||||
@ -1177,7 +1177,7 @@ bool SDSScene::loadTalkData(uint16 num) {
|
||||
}
|
||||
|
||||
void SDSScene::freeTalkData(uint16 num) {
|
||||
for (uint i = 0; i < _talkData.size(); i++) {
|
||||
for (int i = 0; i < (int)_talkData.size(); i++) {
|
||||
if (_talkData[i]._num == num) {
|
||||
_talkData.remove_at(i);
|
||||
i--;
|
||||
@ -1270,8 +1270,8 @@ void SDSScene::updateHead(TalkDataHead &head) {
|
||||
}
|
||||
|
||||
void SDSScene::drawVisibleHeads(Graphics::ManagedSurface *dst) {
|
||||
for (auto tds : _talkData) {
|
||||
for (auto h : tds._heads) {
|
||||
for (const auto &tds : _talkData) {
|
||||
for (const auto &h : tds._heads) {
|
||||
if ((h._flags & kHeadFlagVisible) && !(h._flags & kHeadFlag40)) {
|
||||
drawHead(dst, tds, h);
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ public:
|
||||
|
||||
class TalkData {
|
||||
public:
|
||||
TalkData() : _num(0) {}
|
||||
TalkData() : _num(0), _val(0) {}
|
||||
Common::String dump(const Common::String &indent) const;
|
||||
|
||||
uint16 _num;
|
||||
|
Loading…
x
Reference in New Issue
Block a user