From 4a7883a5e3ab3692cb09ba5eebb45cf5a34c4bfa Mon Sep 17 00:00:00 2001 From: faketruth Date: Thu, 16 Feb 2012 22:28:19 +0000 Subject: git-svn-id: http://mc-server.googlecode.com/svn/trunk@281 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ManualBindings.cpp | 2 +- source/cServer.cpp | 2 +- source/cWebAdmin.cpp | 2 +- source/cWorld.cpp | 4 ++-- source/cWorld.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/ManualBindings.cpp b/source/ManualBindings.cpp index ea6c18e29..34934eebd 100644 --- a/source/ManualBindings.cpp +++ b/source/ManualBindings.cpp @@ -174,7 +174,7 @@ static int tolua_cWorld_ForEachPlayer(lua_State* tolua_S) int TableRef; } Callback( tolua_S, FuncRef, TableRef ); - bool bRetVal = self->ForEachPlayer( &Callback ); + bool bRetVal = self->ForEachPlayer( Callback ); // Unreference the values again, so the LUA_REGISTRYINDEX can make place for other references luaL_unref( tolua_S, LUA_REGISTRYINDEX, TableRef ); diff --git a/source/cServer.cpp b/source/cServer.cpp index a026a0672..4411dfb78 100644 --- a/source/cServer.cpp +++ b/source/cServer.cpp @@ -471,7 +471,7 @@ void cServer::ServerCommand( const char * a_Cmd ) return false; } } Logger; - cRoot::Get()->GetWorld()->ForEachPlayer(&Logger); + cRoot::Get()->GetWorld()->ForEachPlayer(Logger); return; } if( split[0].compare( "numchunks" ) == 0 ) diff --git a/source/cWebAdmin.cpp b/source/cWebAdmin.cpp index bd762736f..692fc5baf 100644 --- a/source/cWebAdmin.cpp +++ b/source/cWebAdmin.cpp @@ -214,7 +214,7 @@ void cWebAdmin::Request_Handler(webserver::http_request* r) cPlayerAccum PlayerAccum; cWorld * World = cRoot::Get()->GetWorld(); // TODO - Create a list of worlds and players - World->ForEachPlayer(&PlayerAccum); + World->ForEachPlayer(PlayerAccum); Content.append(PlayerAccum.m_Contents); Content += "
"; } diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 81058cd93..1161afbff 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -1052,13 +1052,13 @@ void cWorld::RemovePlayer( cPlayer* a_Player ) -bool cWorld::ForEachPlayer(cPlayerListCallback * a_Callback) +bool cWorld::ForEachPlayer(cPlayerListCallback & a_Callback) { // Calls the callback for each player in the list cCSLock Lock(m_CSPlayers); for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) { - if (a_Callback->Item(*itr)) + if (a_Callback.Item(*itr)) { return false; } diff --git a/source/cWorld.h b/source/cWorld.h index 225d45707..19051bbe1 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -91,7 +91,7 @@ public: void RemovePlayer( cPlayer* a_Player ); typedef struct lua_State lua_State; - bool ForEachPlayer(cPlayerListCallback * a_Callback); // Calls the callback for each player in the list + bool ForEachPlayer(cPlayerListCallback & a_Callback); // Calls the callback for each player in the list // >> EXPORTED IN MANUALBINDINGS << unsigned int GetNumPlayers(); //tolua_export -- cgit v1.2.3