From 59af06fd821911c44b44b5338db568b1ae2eff4d Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 17 Jun 2016 23:08:04 +0200 Subject: DM: Fix some CppCheck warnings --- engines/dm/dm.cpp | 7 +++++++ engines/dm/dm.h | 2 +- engines/dm/dungeonman.cpp | 2 +- engines/dm/eventman.cpp | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) (limited to 'engines/dm') diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 40e25d30fd..7875c5c45d 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -41,6 +41,13 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) { // register random source _rnd = new Common::RandomSource("quux"); + _displayMan = nullptr; + _dungeonMan = nullptr; + _eventMan = nullptr; + _menuMan = nullptr; + _stopWaitingForPlayerInput = false; + _gameTimeTicking = false; + debug("DMEngine::DMEngine"); } diff --git a/engines/dm/dm.h b/engines/dm/dm.h index 384ac1dd5d..de37d3fceb 100644 --- a/engines/dm/dm.h +++ b/engines/dm/dm.h @@ -55,7 +55,7 @@ public: static const Thing thingNone; static const Thing thingEndOfList; - Thing() {} + Thing() : data(0) {} Thing(uint16 d) { set(d); } void set(uint16 d) { diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index 35b299d2be..4e09ce4896 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -773,7 +773,7 @@ void DungeonMan::decodeText(char *destString, Thing thing, TextType type) { *destString++ = '\n'; sepChar = ' '; } else if (type == kTextTypeInscription) { - sepChar = 0x80; + sepChar = (char)0x80; } else { sepChar = '\n'; } diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index 6a13b84947..626887ebab 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -218,6 +218,7 @@ EventManager::EventManager(DMEngine *vm) : _vm(vm) { _isCommandQueueLocked = true; _dummyMapIndex = 0; + _pendingClickButton = kNoneMouseButton; } -- cgit v1.2.3