Fix Snowballs service compile under MinGW

This commit is contained in:
kaetemi 2014-06-18 12:52:03 +02:00
parent ec2772564a
commit 5ae595cb15
3 changed files with 7 additions and 7 deletions

View file

@ -50,10 +50,10 @@ public:
virtual ~CBufSock();
/// Sets the application identifier
void setAppId( uint64 id ) { _AppId = id; }
void setAppId( uintptr_t id ) { _AppId = id; }
/// Returns the application identifier
uint64 appId() const { return _AppId; }
uintptr_t appId() const { return _AppId; }
/// Returns a string with the characteristics of the object
std::string asString() const;
@ -256,7 +256,7 @@ private:
NLMISC::CObjectVector<uint8> _ReadyToSendBuffer;
TBlockSize _RTSBIndex;
uint64 _AppId;
uintptr_t _AppId;
// Connected state (from the user's point of view, i.e. changed when the connection/disconnection event is at the front of the receive queue)
bool _ConnectedState;

View file

@ -36,7 +36,7 @@ namespace NLNET {
static size_t ThreadCreator = 0;
static const uint64 AppIdDeadConnection = 0xDEAD;
static const uintptr_t AppIdDeadConnection = 0xDEAD;
uint32 TotalCallbackCalled = 0;

View file

@ -229,7 +229,7 @@ void cbAddClient ( CMessage& msgin, TSockId from, CCallbackNetBase& clientcb )
if(from->appId() != 0)
{
CPlayer *p = (CPlayer *)(uint)from->appId();
CPlayer *p = (CPlayer *)(void *)from->appId();
if(id == p->id)
p->State = CPlayer::ONLINE;
}
@ -590,12 +590,12 @@ void onDisconnectClient ( TSockId from, void *arg )
{
uint32 id;
uint64 i = from->appId();
uintptr_t i = from->appId();
if(i == 0)
return;
CPlayer *p = (CPlayer *)(uint)i;
CPlayer *p = (CPlayer *)(void *)i;
id = p->id;
nlinfo( "A client with unique Id %u has disconnected", id );