More cppcheck fixes.
This commit is contained in:
+4
-4
@@ -47,7 +47,6 @@ Log::Log(string logDirString, int logOnOffInt) : curGameID(0), logOnOff(false)
|
||||
// check if logging path exist
|
||||
if(logDirString != "" && dirExists) {
|
||||
|
||||
int i;
|
||||
string sql;
|
||||
char *errmsg;
|
||||
|
||||
@@ -68,7 +67,8 @@ Log::Log(string logDirString, int logOnOffInt) : curGameID(0), logOnOff(false)
|
||||
sqlite3_open(mySqliteLogFileName.data(), &mySqliteLogDb);
|
||||
if( mySqliteLogDb != 0 ) {
|
||||
|
||||
// create session table
|
||||
int i;
|
||||
// create session table
|
||||
sql = "CREATE TABLE Session (";
|
||||
sql += "PokerTH_Version TEXT NOT NULL";
|
||||
sql += ",Date TEXT NOT NULL";
|
||||
@@ -177,11 +177,11 @@ Log::logNewGameMsg(int gameID, int startCash, int startSmallBlind, unsigned deal
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
string sql;
|
||||
int i;
|
||||
char *errmsg;
|
||||
|
||||
if( mySqliteLogDb != 0 ) {
|
||||
// sqlite-db is open
|
||||
int i;
|
||||
|
||||
sql = "INSERT INTO Game (";
|
||||
sql += "GameID";
|
||||
@@ -222,11 +222,11 @@ Log::logNewHandMsg(int handID, unsigned dealerPosition, int smallBlind, unsigned
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
string sql;
|
||||
int i;
|
||||
char *errmsg;
|
||||
|
||||
if( mySqliteLogDb != 0 ) {
|
||||
// sqlite-db is open
|
||||
int i;
|
||||
|
||||
sql = "INSERT INTO Hand (";
|
||||
sql += "HandID";
|
||||
|
||||
@@ -343,7 +343,7 @@ ClientHand::switchRounds()
|
||||
|
||||
it_1 = it;
|
||||
if(it_1 == runningPlayerList->begin()) it_1 = runningPlayerList->end();
|
||||
it_1--;
|
||||
--it_1;
|
||||
getCurrentBeRo()->setCurrentPlayersTurnId((*it_1)->getMyUniqueID());
|
||||
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void createInternetGameDialogImpl::gameTypeChanged() {
|
||||
std::list<int> myBlindsList = myConfig->readConfigIntList("NetManualBlindsList");
|
||||
std::list<int>::iterator it1;
|
||||
|
||||
for(it1= myBlindsList.begin(); it1 != myBlindsList.end(); it1++) {
|
||||
for(it1= myBlindsList.begin(); it1 != myBlindsList.end(); ++it1) {
|
||||
myChangeCompleteBlindsDialog->listWidget_blinds->addItem(QString::number(*it1,10));
|
||||
}
|
||||
myChangeCompleteBlindsDialog->sortBlindsList();
|
||||
|
||||
@@ -2310,7 +2310,7 @@ void gameTableImpl::postRiverRunAnimation3() {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() != currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
||||
|
||||
for(it_int = winners.begin(); it_int != winners.end(); it_int++) {
|
||||
for(it_int = winners.begin(); it_int != winners.end(); ++it_int) {
|
||||
if((*it_int) == (*it_c)->getMyUniqueID()) {
|
||||
int pot = (*it_c)->getLastMoneyWon();
|
||||
(*it_c)->setMyWinnerState(false, pot);
|
||||
|
||||
@@ -131,7 +131,7 @@ std::list<std::string> tipsList = myW->getMyConfig()->readConfigStringList("Play
|
||||
std::list<std::string> result;
|
||||
std::string separator="(!#$%)";
|
||||
std::list<std::string>::iterator iterator;
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end();iterator++) {
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end(); ++iterator) {
|
||||
tipInfo=QString::fromUtf8(iterator->c_str()).split("(!#$%)", QString::KeepEmptyParts, Qt::CaseSensitive);
|
||||
if(tipInfo.at(0)==playerInfoList.at(0))
|
||||
{
|
||||
@@ -233,7 +233,7 @@ std::list<std::string> tipsList = myW->getMyConfig()->readConfigStringList("Play
|
||||
std::list<std::string>::iterator iterator;
|
||||
QStringList playerInfo;
|
||||
QString result="0";
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end(); iterator++) {
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end(); ++iterator) {
|
||||
playerInfo=QString::fromUtf8(iterator->c_str()).split("(!#$%)", QString::KeepEmptyParts, Qt::CaseSensitive);
|
||||
if(playerInfo.at(0)==playerName)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ QString MyAvatarLabel::getPlayerTip(QString playerName)
|
||||
std::list<std::string> tipsList = myW->getMyConfig()->readConfigStringList("PlayerTooltips");
|
||||
std::list<std::string>::iterator iterator;
|
||||
QStringList playerInfo;
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end(); iterator++) {
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end(); ++iterator) {
|
||||
playerInfo=QString::fromUtf8(iterator->c_str()).split("(!#$%)", QString::KeepEmptyParts, Qt::CaseSensitive);
|
||||
if(playerInfo.at(0)==playerName)return playerInfo.at(1);
|
||||
}
|
||||
@@ -270,7 +270,7 @@ QStringList playerInfo;
|
||||
std::list<std::string> tipsList = myW->getMyConfig()->readConfigStringList("PlayerTooltips");
|
||||
std::list<std::string> result;
|
||||
std::list<std::string>::iterator iterator;
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end();iterator++) {
|
||||
for(iterator = tipsList.begin(); iterator != tipsList.end(); ++iterator) {
|
||||
playerInfo=QString::fromUtf8(iterator->c_str()).split("(!#$%)", QString::KeepEmptyParts, Qt::CaseSensitive);
|
||||
if(QString::fromUtf8(playerName.c_str())==playerInfo.at(0))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user