From e837b80e43788cba093cb6bbe6b1db4bb9b08770 Mon Sep 17 00:00:00 2001 From: Pontus Fransson Date: Tue, 3 Dec 2013 13:07:04 +0100 Subject: [PATCH] Network - Fixed warning, made functions private. Fixed warnings. Made functions regarding the thread private in listener. --- Code/Network/NetworkDependencies/Listener.cpp | 2 +- Code/Network/NetworkDependencies/Listener.h | 3 +-- Code/Network/OysterNetworkServer/ServerMain.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Code/Network/NetworkDependencies/Listener.cpp b/Code/Network/NetworkDependencies/Listener.cpp index c441d045..05616aec 100644 --- a/Code/Network/NetworkDependencies/Listener.cpp +++ b/Code/Network/NetworkDependencies/Listener.cpp @@ -28,7 +28,7 @@ bool Listener::Init(unsigned int port) void Listener::Shutdown() { - thread.Terminate(); + thread.Stop(); } void Listener::SetPostBox(Oyster::Network::IPostBox* postBox) diff --git a/Code/Network/NetworkDependencies/Listener.h b/Code/Network/NetworkDependencies/Listener.h index 8bb16a0f..469e30c6 100644 --- a/Code/Network/NetworkDependencies/Listener.h +++ b/Code/Network/NetworkDependencies/Listener.h @@ -28,16 +28,15 @@ namespace Oyster void SetPostBox(IPostBox* postBox); + private: //Thread functions bool DoWork(); void ThreadEntry(); void ThreadExit(); - private: //Function that runs in the thread. int Accept(); - private: ::Oyster::Network::Connection* connection; diff --git a/Code/Network/OysterNetworkServer/ServerMain.cpp b/Code/Network/OysterNetworkServer/ServerMain.cpp index f1014f59..ec35b1e1 100644 --- a/Code/Network/OysterNetworkServer/ServerMain.cpp +++ b/Code/Network/OysterNetworkServer/ServerMain.cpp @@ -46,9 +46,9 @@ int main() test.nrOfFloats = 16; test.matrix = new float[test.nrOfFloats]; - for(int i = 0; i < test.nrOfFloats; i++) + for(int i = 0; i < (int)test.nrOfFloats; i++) { - test.matrix[i] = i; + test.matrix[i] = (float)i; } t.Pack(test, recvBuffer);