Fixing another cppcheck issue.
This commit is contained in:
@@ -3840,13 +3840,15 @@ void gameTableImpl::leaveCurrentNetworkGame()
|
|||||||
void gameTableImpl::triggerVoteOnKick(int id)
|
void gameTableImpl::triggerVoteOnKick(int id)
|
||||||
{
|
{
|
||||||
|
|
||||||
assert(myStartWindow->getSession()->getCurrentGame());
|
if (myStartWindow->getSession()->getCurrentGame())
|
||||||
PlayerList seatList = myStartWindow->getSession()->getCurrentGame()->getSeatsList();
|
{
|
||||||
int playerCount = static_cast<int>(seatList->size());
|
PlayerList seatList = myStartWindow->getSession()->getCurrentGame()->getSeatsList();
|
||||||
if (id < playerCount) {
|
int playerCount = static_cast<int>(seatList->size());
|
||||||
PlayerListIterator pos = seatList->begin();
|
if (id < playerCount) {
|
||||||
advance(pos, id);
|
PlayerListIterator pos = seatList->begin();
|
||||||
myStartWindow->getSession()->startVoteKickPlayer((*pos)->getMyUniqueID());
|
advance(pos, id);
|
||||||
|
myStartWindow->getSession()->startVoteKickPlayer((*pos)->getMyUniqueID());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user