aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-06-15 08:42:24 +0200
committerStrangerke2012-06-15 08:42:24 +0200
commit71aa08c7f0f00be2e2c9ca013aa7682d79b6796f (patch)
tree691cb02d02a9abc00d7e397357299b818711fdcf
parent7c605c5f69e350e87801912babdf5b3cd65024d3 (diff)
downloadscummvm-rg350-71aa08c7f0f00be2e2c9ca013aa7682d79b6796f.tar.gz
scummvm-rg350-71aa08c7f0f00be2e2c9ca013aa7682d79b6796f.tar.bz2
scummvm-rg350-71aa08c7f0f00be2e2c9ca013aa7682d79b6796f.zip
TONY: Silent more CppCheck warnings
-rw-r--r--engines/tony/tony.cpp15
-rw-r--r--engines/tony/utils.cpp8
2 files changed, 20 insertions, 3 deletions
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index b1e45c8bfa..012dc854b9 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -61,6 +61,21 @@ TonyEngine::TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc) : Eng
if (slotNumber >= 0 && slotNumber <= 99)
_initialLoadSlotNumber = slotNumber;
}
+
+ _hEndOfFrame = 0;
+ for (int i = 0; i < 6; i++)
+ _stream[i] = NULL;
+ for (int i = 0; i < MAX_SFX_CHANNELS; i++) {
+ _sfx[i] = NULL;
+ _utilSfx[i] = NULL;
+ }
+ _bPaused = false;
+ _bDrawLocation = false;
+ _startTime = 0;
+ _curThumbnail = NULL;
+ _bQuitNow = false;
+ _bTimeFreezed = false;
+ _nTimeFreezed = 0;
}
TonyEngine::~TonyEngine() {
diff --git a/engines/tony/utils.cpp b/engines/tony/utils.cpp
index 8e751a811a..b6af8736bd 100644
--- a/engines/tony/utils.cpp
+++ b/engines/tony/utils.cpp
@@ -209,11 +209,9 @@ const RMString &RMString::operator=(const int ch) {
* @param size Length of the string
*/
void RMString::connect(const char *str, int size) {
- int nlen;
-
if (size > 0) {
// Calculate the new lenght
- nlen = _length + size;
+ int nlen = _length + size;
// Resize
resize(nlen + 1, true);
@@ -511,6 +509,9 @@ RMDataStream::RMDataStream() {
_length = 0;
_pos = 0;
_bError = false;
+
+ _buf = NULL;
+ _ecode = 0;
}
/**
@@ -1002,6 +1003,7 @@ RMDataStream &operator>>(RMDataStream &ds, RMRect &rc) {
RMResUpdate::RMResUpdate() {
_infos = NULL;
+ _numUpd = 0;
}
RMResUpdate::~RMResUpdate() {