EbisuSDK: add const qualifiers

This commit is contained in:
Kawe Mazidjatari 2024-11-09 01:12:33 +01:00
parent d0ec49cc52
commit 0ad88c6ae5
2 changed files with 4 additions and 4 deletions

View File

@ -119,9 +119,9 @@ bool IsOriginInitialized()
// Input : *pszName - // Input : *pszName -
// Output : true on success, false on failure // Output : true on success, false on failure
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool IsValidPersonaName(const char* pszName, int nMinLen, int nMaxLen) bool IsValidPersonaName(const char* const pszName, const int nMinLen, const int nMaxLen)
{ {
size_t len = strlen(pszName); const size_t len = strlen(pszName);
if (len < nMinLen || if (len < nMinLen ||
len > nMaxLen) len > nMaxLen)
@ -130,7 +130,7 @@ bool IsValidPersonaName(const char* pszName, int nMinLen, int nMaxLen)
} }
// Check if the name contains any special characters. // Check if the name contains any special characters.
size_t pos = strspn(pszName, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"); const size_t pos = strspn(pszName, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
return pszName[pos] == '\0'; return pszName[pos] == '\0';
} }

View File

@ -23,7 +23,7 @@ const char* HEbisuSDK_GetLanguage();
bool IsOriginDisabled(); bool IsOriginDisabled();
bool IsOriginInitialized(); bool IsOriginInitialized();
bool IsValidPersonaName(const char* pszName, int nMinLen, int nMaxLen); bool IsValidPersonaName(const char* const pszName, const int nMinLen, const int nMaxLen);
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class VEbisuSDK : public IDetour class VEbisuSDK : public IDetour