Skip to content

Commit 657a94f

Browse files
committed
Move CServerListEntry constructors from .h to .cpp
1 parent 238d0c1 commit 657a94f

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/serverlist.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ from clients not on the same LAN as the directory.
7777
/* Implementation *************************************************************/
7878

7979
// --- CServerListEntry ---
80+
CServerListEntry::CServerListEntry() : CServerInfo ( CHostAddress(), CHostAddress(), "", QLocale::AnyCountry, "", 0, false ) { UpdateRegistration(); }
81+
82+
CServerListEntry::CServerListEntry ( const CHostAddress& NHAddr, const CHostAddress& NLHAddr, const CServerCoreInfo& NewCoreServerInfo ) :
83+
CServerInfo ( NHAddr,
84+
NLHAddr,
85+
NewCoreServerInfo.strName,
86+
NewCoreServerInfo.eCountry,
87+
NewCoreServerInfo.strCity,
88+
NewCoreServerInfo.iMaxNumClients,
89+
NewCoreServerInfo.bPermanentOnline )
90+
{
91+
UpdateRegistration();
92+
}
93+
8094
CServerListEntry CServerListEntry::parse ( QString strHAddr,
8195
QString strLHAddr,
8296
QString sName,

src/serverlist.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,8 @@ class CServer;
104104
class CServerListEntry : public CServerInfo
105105
{
106106
public:
107-
CServerListEntry() : CServerInfo ( CHostAddress(), CHostAddress(), "", QLocale::AnyCountry, "", 0, false ) { UpdateRegistration(); }
108-
109-
CServerListEntry ( const CHostAddress& NHAddr, const CHostAddress& NLHAddr, const CServerCoreInfo& NewCoreServerInfo ) :
110-
CServerInfo ( NHAddr,
111-
NLHAddr,
112-
NewCoreServerInfo.strName,
113-
NewCoreServerInfo.eCountry,
114-
NewCoreServerInfo.strCity,
115-
NewCoreServerInfo.iMaxNumClients,
116-
NewCoreServerInfo.bPermanentOnline )
117-
{
118-
UpdateRegistration();
119-
}
107+
CServerListEntry();
108+
CServerListEntry ( const CHostAddress& NHAddr, const CHostAddress& NLHAddr, const CServerCoreInfo& NewCoreServerInfo );
120109

121110
void UpdateRegistration() { RegisterTime.start(); }
122111

0 commit comments

Comments
 (0)