summaryrefslogtreecommitdiffstats
path: root/source/cRoot.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-18 12:38:15 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-18 12:38:15 +0200
commit1b5eaa92b562c09ed7cea4de7186ff6541e65e5f (patch)
tree7e196c6021c1777d25ad4d79bb6530fd933a65d4 /source/cRoot.cpp
parentPacket refactoring, phase two, partial. Rewritten a few packet handling functions not to use cPacket-descendant objects. (diff)
downloadcuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar
cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.gz
cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.bz2
cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.lz
cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.xz
cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.zst
cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.zip
Diffstat (limited to 'source/cRoot.cpp')
-rw-r--r--source/cRoot.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/cRoot.cpp b/source/cRoot.cpp
index 81e7daccb..643b4105b 100644
--- a/source/cRoot.cpp
+++ b/source/cRoot.cpp
@@ -75,18 +75,18 @@ cRoot::~cRoot()
-void cRoot::InputThread(void* a_Params)
+void cRoot::InputThread(void * a_Params)
{
#if defined(ANDROID_NDK)
return;
#else
- cRoot& self = *(cRoot*)a_Params;
+ cRoot & self = *(cRoot*)a_Params;
- while( !(self.m_bStop || self.m_bRestart) )
+ while (!(self.m_bStop || self.m_bRestart))
{
std::string Command;
std::getline(std::cin, Command);
- self.ServerCommand( Command.c_str() );
+ self.ServerCommand(Command);
}
#endif
}
@@ -351,15 +351,15 @@ void cRoot::TickWorlds( float a_Dt )
-void cRoot::ServerCommand( const char * a_Cmd )
+void cRoot::ServerCommand(const AString & a_Cmd)
{
- LOG("Server console command: \"%s\"", a_Cmd );
- m_Server->ServerCommand( a_Cmd );
- if( strcmp(a_Cmd, "stop") == 0 )
+ LOG("Server console command: \"%s\"", a_Cmd.c_str());
+ m_Server->ServerCommand(a_Cmd);
+ if (a_Cmd == "stop")
{
m_bStop = true;
}
- else if( strcmp( a_Cmd, "restart") == 0 )
+ else if (a_Cmd == "restart")
{
m_bRestart = true;
}