Merge pull request #7517 from Robyt3/Style-ConstChar

Use `const char *` instead of `char const *` consistently
This commit is contained in:
heinrich5991 2023-11-20 21:53:13 +00:00 committed by GitHub
commit 83b199b8e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View file

@ -205,8 +205,8 @@ public:
virtual void GetMapInfo(char *pMapName, int MapNameSize, int *pMapSize, SHA256_DIGEST *pSha256, int *pMapCrc) = 0;
virtual bool WouldClientNameChange(int ClientID, const char *pNameRequest) = 0;
virtual void SetClientName(int ClientID, char const *pName) = 0;
virtual void SetClientClan(int ClientID, char const *pClan) = 0;
virtual void SetClientName(int ClientID, const char *pName) = 0;
virtual void SetClientClan(int ClientID, const char *pClan) = 0;
virtual void SetClientCountry(int ClientID, int Country) = 0;
virtual void SetClientScore(int ClientID, std::optional<int> Score) = 0;
virtual void SetClientFlags(int ClientID, int Flags) = 0;
@ -253,7 +253,7 @@ public:
virtual bool DnsblWhite(int ClientID) = 0;
virtual bool DnsblPending(int ClientID) = 0;
virtual bool DnsblBlack(int ClientID) = 0;
virtual const char *GetAnnouncementLine(char const *pFileName) = 0;
virtual const char *GetAnnouncementLine(const char *pFileName) = 0;
virtual bool ClientPrevIngame(int ClientID) = 0;
virtual const char *GetNetErrorString(int ClientID) = 0;
virtual void ResetNetErrorString(int ClientID) = 0;

View file

@ -3868,7 +3868,7 @@ void CServer::GetClientAddr(int ClientID, NETADDR *pAddr) const
}
}
const char *CServer::GetAnnouncementLine(char const *pFileName)
const char *CServer::GetAnnouncementLine(const char *pFileName)
{
if(str_comp(pFileName, m_aAnnouncementFile) != 0)
{

View file

@ -288,7 +288,7 @@ public:
bool WouldClientNameChange(int ClientID, const char *pNameRequest) override;
void SetClientName(int ClientID, const char *pName) override;
void SetClientClan(int ClientID, char const *pClan) override;
void SetClientClan(int ClientID, const char *pClan) override;
void SetClientCountry(int ClientID, int Country) override;
void SetClientScore(int ClientID, std::optional<int> Score) override;
void SetClientFlags(int ClientID, int Flags) override;
@ -457,7 +457,7 @@ public:
void GetClientAddr(int ClientID, NETADDR *pAddr) const override;
int m_aPrevStates[MAX_CLIENTS];
const char *GetAnnouncementLine(char const *pFileName) override;
const char *GetAnnouncementLine(const char *pFileName) override;
int *GetIdMap(int ClientID) override;

View file

@ -439,7 +439,7 @@ public:
bool (*pfnFunc)(const char *pFilename, int StorageType, void *pUser), void *pUser);
struct SStringKeyComparator
{
bool operator()(char const *pLhs, char const *pRhs) const
bool operator()(const char *pLhs, const char *pRhs) const
{
return str_comp(pLhs, pRhs) < 0;
}

View file

@ -19,7 +19,7 @@ char *CSaveTeam::GetString()
return nullptr;
}
int CSaveTeam::FromString(char const *)
int CSaveTeam::FromString(const char *)
{
// Dummy implementation for testing
return 1;