From 7f84bdf8fd5c93286f000bc5f9314eab81128cee Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Sun, 21 Jan 2024 19:34:19 +0000 Subject: Address C4267 compiler warnings (#647) Implicit conversion from `size_t` to a smaller type --- primedev/server/auth/bansystem.cpp | 4 ++-- primedev/server/auth/serverauthentication.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'primedev/server/auth') diff --git a/primedev/server/auth/bansystem.cpp b/primedev/server/auth/bansystem.cpp index 6e4d1644..59bb6067 100644 --- a/primedev/server/auth/bansystem.cpp +++ b/primedev/server/auth/bansystem.cpp @@ -222,8 +222,8 @@ int ConCommand_banCompletion(const char* const partial, char commands[COMMAND_CO const char* cmdName = partial; const char* query = partial + (space == nullptr ? 0 : space - partial) + 1; - const int queryLength = strlen(query); - const int cmdLength = strlen(cmdName) - queryLength; + const size_t queryLength = strlen(query); + const size_t cmdLength = strlen(cmdName) - queryLength; int numCompletions = 0; for (int i = 0; i < GetMaxPlayers() && numCompletions < COMMAND_COMPLETION_MAXITEMS - 2; i++) diff --git a/primedev/server/auth/serverauthentication.cpp b/primedev/server/auth/serverauthentication.cpp index 0d46426f..7d656820 100644 --- a/primedev/server/auth/serverauthentication.cpp +++ b/primedev/server/auth/serverauthentication.cpp @@ -291,7 +291,7 @@ void,, (CBaseClient* self)) { g_pServerAuthentication->m_bForceResetLocalPlayerPersistence = false; g_pServerAuthentication->WritePersistentData(self); - g_pServerPresence->SetPlayerCount(g_pServerAuthentication->m_PlayerAuthenticationData.size()); + g_pServerPresence->SetPlayerCount((int)g_pServerAuthentication->m_PlayerAuthenticationData.size()); } CBaseClient__ActivatePlayer(self); @@ -326,7 +326,7 @@ void,, (CBaseClient* self, uint32_t unknownButAlways1, const char* pReason, ...) g_pServerLimits->RemovePlayer(self); } - g_pServerPresence->SetPlayerCount(g_pServerAuthentication->m_PlayerAuthenticationData.size()); + g_pServerPresence->SetPlayerCount((int)g_pServerAuthentication->m_PlayerAuthenticationData.size()); _CBaseClient__Disconnect(self, unknownButAlways1, buf); } -- cgit v1.2.3