Remove unnecessary allocation.
This commit is contained in:
1 parent
2ad5f1cb40
commit
a87a12e8b0
1 file changed
+2
-5
@@ -3536,8 +3536,7 @@ void gameTableImpl::refreshVotesMonitor(int currentVotes, int numVotesNeededToKi
|
|||||||
|
|
||||||
void gameTableImpl::refreshCardsChance(GameState bero)
|
void gameTableImpl::refreshCardsChance(GameState bero)
|
||||||
{
|
{
|
||||||
|
CardsValue myCardsValue;
|
||||||
CardsValue* myCardsValue = new CardsValue;
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("ShowCardsChanceMonitor")) {
|
if(myConfig->readConfigInt("ShowCardsChanceMonitor")) {
|
||||||
|
|
||||||
@@ -3549,13 +3548,11 @@ void gameTableImpl::refreshCardsChance(GameState bero)
|
|||||||
humanPlayer->getMyCards(holeCards);
|
humanPlayer->getMyCards(holeCards);
|
||||||
myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getBoard()->getMyCards(boardCards);
|
myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getBoard()->getMyCards(boardCards);
|
||||||
|
|
||||||
label_chance->refreshChance(myCardsValue->calcCardsChance(bero, holeCards, boardCards));
|
label_chance->refreshChance(myCardsValue.calcCardsChance(bero, holeCards, boardCards));
|
||||||
} else {
|
} else {
|
||||||
label_chance->resetChance();
|
label_chance->resetChance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete myCardsValue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameTableImpl::refreshActionButtonFKeyIndicator(bool clear)
|
void gameTableImpl::refreshActionButtonFKeyIndicator(bool clear)
|
||||||
|
|||||||
Reference in new issue
Block a user