Several cppcheck fixes.
This commit is contained in:
@@ -96,10 +96,11 @@ void LocalBeRo::run()
|
|||||||
|
|
||||||
PlayerListIterator it_1, it_2;
|
PlayerListIterator it_1, it_2;
|
||||||
|
|
||||||
// running player before smallBlind
|
|
||||||
bool formerRunningPlayerFound = false;
|
|
||||||
if(myHand->getActivePlayerList()->size() > 2) {
|
if(myHand->getActivePlayerList()->size() > 2) {
|
||||||
|
|
||||||
|
// running player before smallBlind
|
||||||
|
bool formerRunningPlayerFound = false;
|
||||||
|
|
||||||
it_1 = myHand->getActivePlayerIt(smallBlindPositionId);
|
it_1 = myHand->getActivePlayerIt(smallBlindPositionId);
|
||||||
if(it_1 == myHand->getActivePlayerList()->end()) {
|
if(it_1 == myHand->getActivePlayerList()->end()) {
|
||||||
throw LocalException(__FILE__, __LINE__, ERR_ACTIVE_PLAYER_NOT_FOUND);
|
throw LocalException(__FILE__, __LINE__, ERR_ACTIVE_PLAYER_NOT_FOUND);
|
||||||
|
|||||||
@@ -2028,11 +2028,9 @@ void gameTableImpl::myCheck()
|
|||||||
int gameTableImpl::getMyCallAmount()
|
int gameTableImpl::getMyCallAmount()
|
||||||
{
|
{
|
||||||
|
|
||||||
int tempHighestSet = 0;
|
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||||
tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet();
|
int tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||||
|
|
||||||
if (humanPlayer->getMyCash() + humanPlayer->getMySet() <= tempHighestSet) {
|
if (humanPlayer->getMyCash() + humanPlayer->getMySet() <= tempHighestSet) {
|
||||||
|
|
||||||
@@ -2070,11 +2068,10 @@ int gameTableImpl::getMyBetAmount()
|
|||||||
void gameTableImpl::myCall()
|
void gameTableImpl::myCall()
|
||||||
{
|
{
|
||||||
|
|
||||||
int tempHighestSet = 0;
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||||
|
|
||||||
tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet();
|
int tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||||
|
|
||||||
if (humanPlayer->getMyCash() + humanPlayer->getMySet() <= tempHighestSet) {
|
if (humanPlayer->getMyCash() + humanPlayer->getMySet() <= tempHighestSet) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ public:
|
|||||||
void blindsWereSet(int sB);
|
void blindsWereSet(int sB);
|
||||||
void newGameStarts();
|
void newGameStarts();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Prevent copy construction.
|
||||||
|
// This is only a declaration.
|
||||||
|
SoundEvents(const SoundEvents &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SDLPlayer *mySDLPlayer;
|
SDLPlayer *mySDLPlayer;
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user