Fixing cppcheck "Prefer prefix ++/-- operators for non-primitive types." issues.
This commit is contained in:
@@ -796,7 +796,7 @@ void gameTableImpl::refreshSet() {
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
if( (*it_c)->getMySet() == 0 )
|
||||
setLabelArray[(*it_c)->getMyID()]->setText("");
|
||||
else
|
||||
@@ -816,7 +816,7 @@ void gameTableImpl::refreshButton() {
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
if( (*it_c)->getMyActiveStatus() ) {
|
||||
if( activePlayerList->size() > 2 ) {
|
||||
switch ( (*it_c)->getMyButton() ) {
|
||||
@@ -870,7 +870,7 @@ void gameTableImpl::refreshPlayerName() {
|
||||
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
if((*it_c)->getMyActiveStatus()) {
|
||||
|
||||
bool guest = myStartWindow->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).isGuest;
|
||||
@@ -915,7 +915,7 @@ void gameTableImpl::refreshPlayerAvatar() {
|
||||
int seatPlace;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(), seatPlace=0; it_c!=seatsList->end(); it_c++, seatPlace++) {
|
||||
for (it_c=seatsList->begin(), seatPlace=0; it_c!=seatsList->end(); ++it_c, seatPlace++) {
|
||||
|
||||
QString countryString(QString(myStartWindow->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).countryCode.c_str()).toLower());
|
||||
countryString = QString(":/cflags/cflags/%1.png").arg(countryString);
|
||||
@@ -987,7 +987,7 @@ void gameTableImpl::refreshAction(int playerID, int playerAction) {
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
|
||||
//if no action --> clear Pixmap
|
||||
if( (*it_c)->getMyAction() == 0) {
|
||||
@@ -1042,7 +1042,7 @@ void gameTableImpl::refreshCash() {
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
if((*it_c)->getMyActiveStatus()) {
|
||||
|
||||
cashLabelArray[(*it_c)->getMyID()]->setText("$"+QString("%L1").arg((*it_c)->getMyCash()));
|
||||
@@ -1062,7 +1062,7 @@ void gameTableImpl::refreshGroupbox(int playerID, int status) {
|
||||
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
|
||||
if((*it_c)->getMyTurn()) {
|
||||
//Groupbox glow wenn der Spiele dran ist.
|
||||
@@ -1173,7 +1173,7 @@ void gameTableImpl::refreshAll() {
|
||||
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
refreshAction( (*it_c)->getMyID(), (*it_c)->getMyAction());
|
||||
}
|
||||
|
||||
@@ -1190,7 +1190,7 @@ void gameTableImpl::refreshChangePlayer() {
|
||||
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
refreshAction( (*it_c)->getMyID(), (*it_c)->getMyAction());
|
||||
}
|
||||
|
||||
@@ -1234,7 +1234,7 @@ void gameTableImpl::dealHoleCards() {
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
(*it_c)->getMyCards(tempCardsIntArray);
|
||||
for(j=0; j<2; j++) {
|
||||
if((*it_c)->getMyActiveStatus()) {
|
||||
@@ -2081,7 +2081,7 @@ void gameTableImpl::nextPlayerAnimation() {
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatsList = currentHand->getSeatsList();
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||
if((*it_c)->getMyID() == currentHand->getLastPlayersTurn()) break;
|
||||
}
|
||||
|
||||
@@ -2160,7 +2160,7 @@ void gameTableImpl::postRiverRunAnimation2() {
|
||||
int nonfoldPlayersCounter = 0;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD)
|
||||
nonfoldPlayersCounter++;
|
||||
}
|
||||
@@ -2169,7 +2169,7 @@ void gameTableImpl::postRiverRunAnimation2() {
|
||||
|
||||
if(!flipHolecardsAllInAlreadyDone) {
|
||||
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->checkIfINeedToShowCards()) {
|
||||
|
||||
showHoleCards((*it_c)->getMyUniqueID());
|
||||
@@ -2185,7 +2185,7 @@ void gameTableImpl::postRiverRunAnimation2() {
|
||||
flipHolecardsAllInAlreadyDone = TRUE;
|
||||
}
|
||||
else {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||
//set Player value (logging) for all in already shown cards
|
||||
(*it_c)->setMyCardsFlip(1,3);
|
||||
@@ -2216,7 +2216,7 @@ void gameTableImpl::postRiverRunAnimation3() {
|
||||
PlayerListConstIterator it_c;
|
||||
|
||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||
nonfoldPlayerCounter++;
|
||||
}
|
||||
@@ -2224,7 +2224,7 @@ void gameTableImpl::postRiverRunAnimation3() {
|
||||
|
||||
list<unsigned> winners = currentHand->getBoard()->getWinners();
|
||||
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
||||
|
||||
//Show "Winner" label
|
||||
@@ -2307,7 +2307,7 @@ void gameTableImpl::postRiverRunAnimation3() {
|
||||
|
||||
// log side pot winners -> TODO
|
||||
list<unsigned>::iterator it_int;
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
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++) {
|
||||
@@ -2320,7 +2320,7 @@ void gameTableImpl::postRiverRunAnimation3() {
|
||||
}
|
||||
}
|
||||
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyCash() == 0) {
|
||||
currentHand->getGuiInterface()->logPlayerSitsOut((*it_c)->getMyName());
|
||||
}
|
||||
@@ -2349,7 +2349,7 @@ void gameTableImpl::postRiverRunAnimation5() {
|
||||
|
||||
label_Pot->setText("");
|
||||
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
||||
|
||||
@@ -2360,7 +2360,7 @@ void gameTableImpl::postRiverRunAnimation5() {
|
||||
else {
|
||||
label_Pot->setText(PotString);
|
||||
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
||||
|
||||
@@ -2400,14 +2400,14 @@ void gameTableImpl::postRiverRunAnimation6() {
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if ((*it_c)->getMyCash() > 0) playersPositiveCashCounter++;
|
||||
}
|
||||
|
||||
if (playersPositiveCashCounter==1) {
|
||||
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if ((*it_c)->getMyCash() > 0) {
|
||||
currentHand->getGuiInterface()->logPlayerWinGame((*it_c)->getMyName(), myStartWindow->getSession()->getCurrentGame()->getMyGameID());
|
||||
@@ -2446,7 +2446,7 @@ void gameTableImpl::showHoleCards(unsigned playerId, bool allIn)
|
||||
int j;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if((*it_c)->getMyUniqueID() == playerId) {
|
||||
|
||||
@@ -2481,12 +2481,12 @@ void gameTableImpl::flipHolecardsAllIn() {
|
||||
int nonfoldPlayersCounter = 0;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) nonfoldPlayersCounter++;
|
||||
}
|
||||
|
||||
if(nonfoldPlayersCounter!=1) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||
|
||||
showHoleCards((*it_c)->getMyUniqueID());
|
||||
|
||||
@@ -216,7 +216,7 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
logFileStreamString += "BLIND LEVEL: $"+QString::number(currentHand->getSmallBlind())+" / $"+QString::number(currentHand->getSmallBlind()*2)+"</br>";
|
||||
|
||||
//print cash only for active players
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
logFileStreamString += "Seat " + QString::number((*it_c)->getMyID()+1,10) + ": <b>" + QString::fromUtf8((*it_c)->getMyName().c_str()) + "</b> ($" + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10)+")</br>";
|
||||
|
||||
@@ -249,7 +249,7 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
sql += "," + boost::lexical_cast<string>(myW->getSession()->getCurrentGame()->getStartSmallBlind());
|
||||
sql += "," + boost::lexical_cast<string>(myW->getSession()->getCurrentGame()->getDealerPosition());
|
||||
PlayerList seatList = currentHand->getSeatsList();
|
||||
for(it_c = seatList->begin();it_c!=seatList->end();it_c++) {
|
||||
for(it_c = seatList->begin();it_c!=seatList->end();++it_c) {
|
||||
if((*it_c)->getMyActiveStatus()) {
|
||||
sql += ",\"" + (*it_c)->getMyName() +"\"";
|
||||
} else {
|
||||
@@ -276,7 +276,7 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
|
||||
// // hand data
|
||||
// sql = "INSERT INTO Hand (HandID,GameID,Sb_Amount,Bb_Amount";
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
|
||||
// sql += ",Seat_" + QString::number((*it_c)->getMyID()+1,10) + "_Cash";
|
||||
// }
|
||||
//// for(i=1;i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
@@ -287,10 +287,10 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
// sql += "," + QString::number(gameID,10);
|
||||
// sql += "," + QString::number(currentHand->getSmallBlind(),10);
|
||||
// sql += "," + QString::number(currentHand->getSmallBlind()*2,10);
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
|
||||
// sql += "," + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10);
|
||||
// }
|
||||
//// for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();it_c++) {
|
||||
//// for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();++it_c) {
|
||||
//// if((*it_c)->getMyActiveStatus()) {
|
||||
//// sql += "," + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10);
|
||||
//// } else {
|
||||
@@ -310,7 +310,7 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
// // beginning of a game
|
||||
// if(handID == 1) {
|
||||
// sql = "INSERT INTO Game (GameID,Startmoney,StartSb,DealerPos";
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
|
||||
// sql += ",Seat_" + QString::number((*it_c)->getMyID()+1,10);
|
||||
// }
|
||||
//// for(i=1;i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
@@ -321,10 +321,10 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
// sql += QString::number(myW->getSession()->getCurrentGame()->getStartCash(),10) + ",";
|
||||
// sql += QString::number(myW->getSession()->getCurrentGame()->getStartSmallBlind(),10) + ",";
|
||||
// sql += QString::number(myW->getSession()->getCurrentGame()->getDealerPosition(),10);
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
|
||||
// sql += ",'" + QString::fromUtf8((*it_c)->getMyName().c_str()) +"'";
|
||||
// }
|
||||
//// for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();it_c++) {
|
||||
//// for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();++it_c) {
|
||||
//// if((*it_c)->getMyActiveStatus()) {
|
||||
//// sql += ",'" + QString::fromUtf8((*it_c)->getMyName().c_str()) +"'";
|
||||
//// } else {
|
||||
@@ -339,7 +339,7 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
|
||||
// // beginning of a hand
|
||||
// sql = "INSERT INTO Hand (HandID,GameID,Sb_Amount,Bb_Amount";
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
|
||||
// sql += ",Seat_" + QString::number((*it_c)->getMyID()+1,10) + "_Cash";
|
||||
// }
|
||||
//// for(i=1;i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
@@ -350,10 +350,10 @@ void guiLog::logNewGameHandMsg(int gameID, int handID) {
|
||||
// sql += "," + QString::number(gameID,10);
|
||||
// sql += "," + QString::number(currentHand->getSmallBlind(),10);
|
||||
// sql += "," + QString::number(currentHand->getSmallBlind()*2,10);
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
// for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
|
||||
// sql += "," + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10);
|
||||
// }
|
||||
//// for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();it_c++) {
|
||||
//// for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();++it_c) {
|
||||
//// if((*it_c)->getMyActiveStatus()) {
|
||||
//// sql += "," + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10);
|
||||
//// } else {
|
||||
@@ -397,7 +397,7 @@ void guiLog::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString b
|
||||
boost::shared_ptr<Game> currentGame = myW->getSession()->getCurrentGame();
|
||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if(activePlayerList->size() > 2) {
|
||||
if((*it_c)->getMyButton() == BUTTON_DEALER) {
|
||||
@@ -1548,7 +1548,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||
|
||||
// collect cardsValueInt of all players who will show their cards
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
||||
|
||||
if( (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||
shownCardsValueInt.push_back( (*it_c)->getMyCardsValueInt());
|
||||
@@ -1557,7 +1557,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
|
||||
// erase own cardsValueInt
|
||||
list<int>::iterator it;
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if((*it) == myCardsValueInt) {
|
||||
shownCardsValueInt.erase(it);
|
||||
break;
|
||||
@@ -1583,7 +1583,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
handName = translateCardsValueCode(myCardsValueInt).at(0)+translateCardsValueCode(myCardsValueInt).at(1);
|
||||
|
||||
// same hand detection
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if(((*it)/1000000) == (myCardsValueInt/1000000)) {
|
||||
sameHandCardsValueInt.push_back(*it);
|
||||
}
|
||||
@@ -1595,7 +1595,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10000) == (myCardsValueInt/10000)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1620,7 +1620,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
handName = translateCardsValueCode(myCardsValueInt).at(0)+translateCardsValueCode(myCardsValueInt).at(1);
|
||||
|
||||
// same hand detection
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if(((*it)/1000000) == (myCardsValueInt/1000000)) {
|
||||
sameHandCardsValueInt.push_back(*it);
|
||||
}
|
||||
@@ -1632,7 +1632,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10000) == (myCardsValueInt/10000)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1649,7 +1649,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/100) == (myCardsValueInt/100)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1666,7 +1666,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10) == (myCardsValueInt/10)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1683,7 +1683,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if((*it) == myCardsValueInt) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1709,7 +1709,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
handName = translateCardsValueCode(myCardsValueInt).at(0)+translateCardsValueCode(myCardsValueInt).at(1);
|
||||
|
||||
// same hand detection
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if(((*it)/1000000) == (myCardsValueInt/1000000)) {
|
||||
sameHandCardsValueInt.push_back(*it);
|
||||
}
|
||||
@@ -1721,7 +1721,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10000) == (myCardsValueInt/10000)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1738,7 +1738,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/100) == (myCardsValueInt/100)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1758,7 +1758,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
handName = translateCardsValueCode(myCardsValueInt).at(0)+translateCardsValueCode(myCardsValueInt).at(1)+translateCardsValueCode(myCardsValueInt).at(2);
|
||||
|
||||
// same hand detection
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if(((*it)/10000) == (myCardsValueInt/10000)) {
|
||||
sameHandCardsValueInt.push_back(*it);
|
||||
}
|
||||
@@ -1770,7 +1770,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/100) == (myCardsValueInt/100)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1790,7 +1790,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
handName = translateCardsValueCode(myCardsValueInt).at(0)+translateCardsValueCode(myCardsValueInt).at(1);
|
||||
|
||||
// same hand detection
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if(((*it)/1000000) == (myCardsValueInt/1000000)) {
|
||||
sameHandCardsValueInt.push_back(*it);
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10000) == (myCardsValueInt/10000)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1819,7 +1819,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/100) == (myCardsValueInt/100)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1836,7 +1836,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if((*it) == myCardsValueInt) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1857,7 +1857,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
handName = translateCardsValueCode(myCardsValueInt).at(0)+translateCardsValueCode(myCardsValueInt).at(1);
|
||||
|
||||
// same hand detection
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); it++) {
|
||||
for(it = shownCardsValueInt.begin(); it != shownCardsValueInt.end(); ++it) {
|
||||
if(((*it)/1000000) == (myCardsValueInt/1000000)) {
|
||||
sameHandCardsValueInt.push_back(*it);
|
||||
}
|
||||
@@ -1869,7 +1869,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10000) == (myCardsValueInt/10000)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1886,7 +1886,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/100) == (myCardsValueInt/100)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1903,7 +1903,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if(((*it)/10) == (myCardsValueInt/10)) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
@@ -1920,7 +1920,7 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if((*it) == myCardsValueInt) {
|
||||
equal = true;
|
||||
it++;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
it = sameHandCardsValueInt.erase(it);
|
||||
|
||||
@@ -60,7 +60,7 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
||||
PlayerListConstIterator it_c;
|
||||
int activePlayerCounter=0;
|
||||
PlayerList seatList = currentGame->getSeatsList();
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); it_c++) {
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
if((*it_c)->getMyActiveStatus()) activePlayerCounter++;
|
||||
}
|
||||
GameInfo info(myW->getSession()->getClientGameInfo(myW->getSession()->getClientCurrentGameId()));
|
||||
@@ -75,7 +75,7 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
||||
action_IgnorePlayer->setEnabled(true);
|
||||
action_EditTip->setEnabled(true);
|
||||
int j=0;
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); it_c++) {
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
|
||||
if(myId == j) {
|
||||
if(j == 0)
|
||||
@@ -103,7 +103,7 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
||||
}
|
||||
|
||||
int i=0;
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); it_c++) {
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
|
||||
//also inactive player which stays on table can be voted to kick
|
||||
if(myContextMenuEnabled && myId != 0 && myId == i && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER && ( (*it_c)->getMyActiveStatus() || (*it_c)->getMyStayOnTableStatus() ) )
|
||||
@@ -174,7 +174,7 @@ boost::shared_ptr<Game> curGame = myW->myStartWindow->getSession()->getCurrentGa
|
||||
PlayerListConstIterator it_c;
|
||||
int seatPlace;
|
||||
PlayerList seatsList = curGame->getSeatsList();
|
||||
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++, seatPlace++) {
|
||||
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) {
|
||||
for(int i=1;i<=5;i++)myW->playerStarsArray[i][seatPlace]->setText("");
|
||||
if(myW->myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !myW->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).isGuest && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER)
|
||||
if((*it_c)->getMyStayOnTableStatus() == TRUE && (*it_c)->getMyName()!="" && seatPlace!=0) {
|
||||
@@ -197,7 +197,7 @@ void MyAvatarLabel::refreshTooltips() {
|
||||
PlayerListConstIterator it_c;
|
||||
int seatPlace;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++, seatPlace++) {
|
||||
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) {
|
||||
if((*it_c)->getMyStayOnTableStatus() == TRUE || (*it_c)->getMyActiveStatus()) {
|
||||
bool computerPlayer = false;
|
||||
if((*it_c)->getMyType() == PLAYER_TYPE_COMPUTER) { computerPlayer = true; }
|
||||
@@ -377,7 +377,7 @@ void MyAvatarLabel::putPlayerOnIgnoreList() {
|
||||
QStringList list;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatList = myW->getSession()->getCurrentGame()->getSeatsList();
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); it_c++) {
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
list << QString::fromUtf8((*it_c)->getMyName().c_str());
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ void MyAvatarLabel::reportBadAvatar() {
|
||||
int j=0;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatList = currentGame->getSeatsList();
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); it_c++) {
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
|
||||
if(myId == j) {
|
||||
|
||||
@@ -430,7 +430,7 @@ void MyAvatarLabel::startEditTip() {
|
||||
int j=0;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatList = currentGame->getSeatsList();
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); it_c++) {
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
if(myId == j) {
|
||||
QString nick = QString::fromUtf8((*it_c)->getMyName().c_str());
|
||||
startChangePlayerTip(nick);
|
||||
|
||||
Reference in New Issue
Block a user