Fixing another cppcheck issue.

This commit is contained in:
lotodore
2015-01-14 22:07:44 +01:00
parent 54eabb28c8
commit 8a000bdc2b
+9 -7
View File
@@ -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());
}
} }
} }