Fixed some compiler warnings. Added error if game is running.

This commit is contained in:
lotodore
2007-09-03 18:05:39 +00:00
parent ecab6ed86b
commit 23d9bb71c3
8 changed files with 25 additions and 28 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
//
#include "clientbero.h"
ClientBeRo::ClientBeRo(HandInterface* hi, int id, int qP, int dP, int sB, GameState gS)
ClientBeRo::ClientBeRo(HandInterface* hi, int /*id*/, int /*qP*/, int dP, int sB, GameState gS)
: BeRoInterface(), myHand(hi), highestCardsValue(0), myBeRoID(gS), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRound(1), playersTurn(dP), minimumRaise(0)
{
}
+5 -5
View File
@@ -165,7 +165,7 @@ ClientPlayer::getMyLastRelativeSet() const
}
void
ClientPlayer::setMyAction(int theValue, bool blind)
ClientPlayer::setMyAction(int theValue, bool /*blind*/)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
myAction = theValue;
@@ -421,20 +421,20 @@ ClientPlayer::riverEngine()
void
ClientPlayer::evaluation(int bet, int raise)
ClientPlayer::evaluation(int /*bet*/, int /*raise*/)
{
}
int
ClientPlayer::preflopCardsValue(int* cards)
ClientPlayer::preflopCardsValue(int* /*cards*/)
{
return 0;
}
int
ClientPlayer::flopCardsValue(int* cards)
ClientPlayer::flopCardsValue(int* /*cards*/)
{
return 0;
}
@@ -446,7 +446,7 @@ ClientPlayer::readFile()
}
int
ClientPlayer::turnCardsValue(int* cards)
ClientPlayer::turnCardsValue(int* /*cards*/)
{
return 0;
}
@@ -121,9 +121,9 @@ void joinNetworkGameDialogImpl::fillServerProfileList() {
TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild().ToElement();
if ( profile ) {
for( profile; profile; profile = profile->NextSiblingElement()) {
for( ; profile; profile = profile->NextSiblingElement()) {
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget,0);
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget,0);
item->setData(0, 0, QString::fromUtf8(profile->Attribute("Name")));
item->setData(1, 0, QString::fromUtf8(profile->Attribute("Address")));
item->setData(2, 0, profile->Attribute("Port"));
+1 -4
View File
@@ -570,7 +570,6 @@ int
ClientStateWaitGame::InternalProcess(ClientThread &client, boost::shared_ptr<NetPacket> packet)
{
int retVal = MSG_SOCK_INTERNAL_PENDING;
ClientContext &context = client.GetContext();
if (packet->ToNetPacketGameStart())
{
@@ -653,7 +652,6 @@ int
ClientStateWaitHand::InternalProcess(ClientThread &client, boost::shared_ptr<NetPacket> packet)
{
int retVal = MSG_SOCK_INTERNAL_PENDING;
ClientContext &context = client.GetContext();
if (packet->ToNetPacketHandStart())
{
@@ -717,7 +715,6 @@ int
ClientStateRunHand::InternalProcess(ClientThread &client, boost::shared_ptr<NetPacket> packet)
{
int retVal = MSG_SOCK_INTERNAL_PENDING;
ClientContext &context = client.GetContext();
if (packet.get())
{
@@ -1095,7 +1092,7 @@ ClientStateFinal::~ClientStateFinal()
}
int
ClientStateFinal::Process(ClientThread &client)
ClientStateFinal::Process(ClientThread &/*client*/)
{
Thread::Msleep(10);
+1 -1
View File
@@ -40,7 +40,7 @@ public:
ClientSenderCallback(ClientThread &client) : m_client(client) {}
virtual ~ClientSenderCallback() {}
virtual void SignalNetError(SOCKET sock, int errorID, int osErrorID)
virtual void SignalNetError(SOCKET /*sock*/, int errorID, int osErrorID)
{
// For now, we ignore the socket.
// Just signal the error.
+12 -14
View File
@@ -981,7 +981,7 @@ NetPacketInitAck::ToNetPacketInitAck() const
}
void
NetPacketInitAck::InternalCheck(const NetPacketHeader* data) const
NetPacketInitAck::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1186,9 +1186,8 @@ NetPacketGameListUpdate::ToNetPacketGameListUpdate() const
}
void
NetPacketGameListUpdate::InternalCheck(const NetPacketHeader* data) const
NetPacketGameListUpdate::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
//-----------------------------------------------------------------------------
@@ -1246,7 +1245,7 @@ NetPacketGameListPlayerJoined::ToNetPacketGameListPlayerJoined() const
}
void
NetPacketGameListPlayerJoined::InternalCheck(const NetPacketHeader* data) const
NetPacketGameListPlayerJoined::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1306,7 +1305,7 @@ NetPacketGameListPlayerLeft::ToNetPacketGameListPlayerLeft() const
}
void
NetPacketGameListPlayerLeft::InternalCheck(const NetPacketHeader* data) const
NetPacketGameListPlayerLeft::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1364,7 +1363,7 @@ NetPacketRetrievePlayerInfo::ToNetPacketRetrievePlayerInfo() const
}
void
NetPacketRetrievePlayerInfo::InternalCheck(const NetPacketHeader* data) const
NetPacketRetrievePlayerInfo::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1748,7 +1747,6 @@ NetPacketJoinGameAck::ToNetPacketJoinGameAck() const
void
NetPacketJoinGameAck::InternalCheck(const NetPacketHeader* data) const
{
u_int16_t dataLen = ntohs(data->length);
NetPacketJoinGameAckData *tmpData = (NetPacketJoinGameAckData *)data;
// Semantic checks
int maxNumPlayers = ntohs(tmpData->maxNumberOfPlayers);
@@ -1820,7 +1818,7 @@ NetPacketPlayerJoined::ToNetPacketPlayerJoined() const
}
void
NetPacketPlayerJoined::InternalCheck(const NetPacketHeader* data) const
NetPacketPlayerJoined::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1878,7 +1876,7 @@ NetPacketPlayerLeft::ToNetPacketPlayerLeft() const
}
void
NetPacketPlayerLeft::InternalCheck(const NetPacketHeader* data) const
NetPacketPlayerLeft::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1936,7 +1934,7 @@ NetPacketKickPlayer::ToNetPacketKickPlayer() const
}
void
NetPacketKickPlayer::InternalCheck(const NetPacketHeader* data) const
NetPacketKickPlayer::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -1973,7 +1971,7 @@ NetPacketStartEvent::ToNetPacketStartEvent() const
}
void
NetPacketStartEvent::InternalCheck(const NetPacketHeader* data) const
NetPacketStartEvent::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -2907,7 +2905,7 @@ NetPacketEndOfHandHideCards::ToNetPacketEndOfHandHideCards() const
}
void
NetPacketEndOfHandHideCards::InternalCheck(const NetPacketHeader* data) const
NetPacketEndOfHandHideCards::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -2963,7 +2961,7 @@ NetPacketEndOfGame::ToNetPacketEndOfGame() const
}
void
NetPacketEndOfGame::InternalCheck(const NetPacketHeader* data) const
NetPacketEndOfGame::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
@@ -3265,7 +3263,7 @@ NetPacketError::ToNetPacketError() const
}
void
NetPacketError::InternalCheck(const NetPacketHeader* data) const
NetPacketError::InternalCheck(const NetPacketHeader*) const
{
// Nothing to do.
}
+1 -1
View File
@@ -352,7 +352,7 @@ void
AbstractServerGameStateRunning::HandleNewSession(ServerGameThread &server, SessionWrapper session)
{
// Do not accept new sessions in this state.
// TODO
server.SessionError(session, ERR_NET_GAME_ALREADY_RUNNING);
}
//-----------------------------------------------------------------------------
+2
View File
@@ -123,6 +123,8 @@ public:
protected:
NetPacket &operator=(const NetPacket& right); // not allowed
void Check(const NetPacketHeader *data) const;
virtual void InternalCheck(const NetPacketHeader *data) const = 0;