Fixing possible memory leak and compiler warnings.

This commit is contained in:
lotodore
2011-02-28 19:59:14 +00:00
parent 2cd2ac57ca
commit 2ad5f1cb40
3 changed files with 7 additions and 6 deletions
+1
View File
@@ -299,6 +299,7 @@ CryptHelper::AES128Encrypt(const unsigned char *keyData, unsigned keySize, const
gcry_cipher_close(hd);
#endif
delete[] paddedPlainStr;
}
return retVal;
}
+3 -3
View File
@@ -68,9 +68,9 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
currentBoard = myFactory->createBoard(dealerPosition);
// create player lists
seatsList = PlayerList(new std::list<boost::shared_ptr<PlayerInterface> >);
activePlayerList = PlayerList(new std::list<boost::shared_ptr<PlayerInterface> >);
runningPlayerList = PlayerList(new std::list<boost::shared_ptr<PlayerInterface> >);
seatsList.reset(new std::list<boost::shared_ptr<PlayerInterface> >);
activePlayerList.reset(new std::list<boost::shared_ptr<PlayerInterface> >);
runningPlayerList.reset(new std::list<boost::shared_ptr<PlayerInterface> >);
// create player
player_i = playerDataList.begin();
+3 -3
View File
@@ -2966,7 +2966,7 @@ void gameTableImpl::changePlayingMode()
}
switch (mode) {
/* switch (mode) {
// case 0: { statusBar()->showMessage(tr("Manual mode set. You've got to choose yourself now."), 5000); }
break;
@@ -2975,10 +2975,10 @@ void gameTableImpl::changePlayingMode()
// case 2: { statusBar()->showMessage(tr("Auto mode set: Check or fold."), 5000); }
break;
default: {
/*cout << "changePlayingMode ERROR!!!!" << endl;*/
//cout << "changePlayingMode ERROR!!!!" << endl;
}
}
}*/
playingMode = mode;
}