Revert "Net tests were failing to compile because 'static members' weren't actually being declared as members..."

This reverts commit 32f726dcc6.
This commit is contained in:
Thomas "elfprince13" Dickerson 2017-01-05 17:23:48 -05:00
parent 0e30426def
commit 710a2a9b7b
3 changed files with 13 additions and 18 deletions

View file

@ -491,10 +491,11 @@ template<class T> T ReservedSocketList<T>::resolve(NetSocket socketToResolve)
EntryType &entry = mSocketList[socketToResolve.getHandle()];
return entry.used ? entry.value : -1;
}
ConnectionNotifyEvent* Net::smConnectionNotify = NULL;
ConnectionAcceptedEvent* Net::smConnectionAccept = NULL;
ConnectionReceiveEvent* Net::smConnectionReceive = NULL;
PacketReceiveEvent* Net::smPacketReceive = NULL;
static ConnectionNotifyEvent* smConnectionNotify = NULL;
static ConnectionAcceptedEvent* smConnectionAccept = NULL;
static ConnectionReceiveEvent* smConnectionReceive = NULL;
static PacketReceiveEvent* smPacketReceive = NULL;
ConnectionNotifyEvent& Net::getConnectionNotifyEvent()
{

View file

@ -214,12 +214,6 @@ struct Net
static bool smMulticastEnabled;
static bool smIpv4Enabled;
static bool smIpv6Enabled;
static ConnectionNotifyEvent* smConnectionNotify;
static ConnectionAcceptedEvent* smConnectionAccept;
static ConnectionReceiveEvent* smConnectionReceive;
static PacketReceiveEvent* smPacketReceive;
static bool init();
static void shutdown();

View file

@ -76,8 +76,8 @@ TEST(Net, TCPRequest)
handler.mDataReceived = 0;
// Hook into the signals.
Net::smConnectionNotify ->notify(&handler, &TcpHandle::notify);
Net::smConnectionReceive->notify(&handler, &TcpHandle::receive);
Net::smConnectionNotify .notify(&handler, &TcpHandle::notify);
Net::smConnectionReceive.notify(&handler, &TcpHandle::receive);
// Open a TCP connection to garagegames.com
handler.mSocket = Net::openConnectTo("72.246.107.193:80");
@ -85,8 +85,8 @@ TEST(Net, TCPRequest)
while(Process::processEvents() && (Platform::getRealMilliseconds() < limit) ) {}
// Unhook from the signals.
Net::smConnectionNotify ->remove(&handler, &TcpHandle::notify);
Net::smConnectionReceive->remove(&handler, &TcpHandle::receive);
Net::smConnectionNotify .remove(&handler, &TcpHandle::notify);
Net::smConnectionReceive.remove(&handler, &TcpHandle::receive);
EXPECT_GT(handler.mDataReceived, 0)
<< "Didn't get any data back!";
@ -139,8 +139,8 @@ struct JournalHandle
mDataReceived = 0;
// Hook into the signals.
Net::smConnectionNotify ->notify(this, &JournalHandle::notify);
Net::smConnectionReceive->notify(this, &JournalHandle::receive);
Net::smConnectionNotify .notify(this, &JournalHandle::notify);
Net::smConnectionReceive.notify(this, &JournalHandle::receive);
// Open a TCP connection to garagegames.com
mSocket = Net::openConnectTo("72.246.107.193:80");
@ -149,8 +149,8 @@ struct JournalHandle
while(Process::processEvents()) {}
// Unhook from the signals.
Net::smConnectionNotify ->remove(this, &JournalHandle::notify);
Net::smConnectionReceive->remove(this, &JournalHandle::receive);
Net::smConnectionNotify .remove(this, &JournalHandle::notify);
Net::smConnectionReceive.remove(this, &JournalHandle::receive);
EXPECT_GT(mDataReceived, 0)
<< "Didn't get any data back!";