Skip to content

Commit

Permalink
TONY: Silent more CppCheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jun 15, 2012
1 parent 7c605c5 commit 71aa08c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
15 changes: 15 additions & 0 deletions engines/tony/tony.cpp
Expand Up @@ -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() {
Expand Down
8 changes: 5 additions & 3 deletions engines/tony/utils.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -511,6 +509,9 @@ RMDataStream::RMDataStream() {
_length = 0;
_pos = 0;
_bError = false;

_buf = NULL;
_ecode = 0;
}

/**
Expand Down Expand Up @@ -1002,6 +1003,7 @@ RMDataStream &operator>>(RMDataStream &ds, RMRect &rc) {

RMResUpdate::RMResUpdate() {
_infos = NULL;
_numUpd = 0;
}

RMResUpdate::~RMResUpdate() {
Expand Down

0 comments on commit 71aa08c

Please sign in to comment.