File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080#include " MasterServer.h"
8181
8282MasterServer::MasterServer () {
83- // TODO Auto-generated constructor stub
84- last_check=0 ;
85- ServerList.clear ();
83+ _init ();
8684}
8785
8886MasterServer::MasterServer (E_GameServer* gameserver) {
87+ _init ();
8988
90- last_check=0 ;
9189}
9290
9391MasterServer::~MasterServer () {
9492 // TODO Auto-generated destructor stub
9593}
9694
9795
96+ void MasterServer::_init (){
97+ last_check=0 ;
98+ ServerList.clear ();
99+ ServerList.resize (0 );
100+ }
101+
98102int MasterServer::RemoveStaleEntries (){
99103 // TODO: remove stale entries from the list.
100104
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class MasterServer: public E_GameServer {
2222 MasterServer ();
2323 MasterServer (E_GameServer *);
2424 virtual ~MasterServer ();
25+ void _init ();
2526
2627 int RemoveStaleEntries ();
2728
You can’t perform that action at this time.
0 commit comments