mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier1: light cleanup on low level types
CCommand: use 'V_isdigit()' since that is faster, we don't need it to be locale aware. CMemoryStack: move 'highest' var to string format directly to avoid compile warnings (unused loval variables) on more recent visual studio compilers when compiling the DLL in cert mode.
This commit is contained in:
parent
f18a4c17a4
commit
d467989e7c
@ -119,7 +119,7 @@ bool CCommand::Tokenize(const char* pCommand, cmd_source_t source, characterset_
|
||||
size_t nLen = Q_strlen(pCommand);
|
||||
if (nLen >= COMMAND_MAX_LENGTH - 1)
|
||||
{
|
||||
Warning(eDLL_T::COMMON, "%s: Encountered command which overflows the tokenizer buffer... Skipping!\n", __FUNCTION__);
|
||||
Warning(eDLL_T::COMMON, "%s: Encountered command which overflows the tokenizer buffer... Skipped!\n", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ bool CCommand::Tokenize(const char* pCommand, cmd_source_t source, characterset_
|
||||
|
||||
if (m_nArgc >= COMMAND_MAX_ARGC)
|
||||
{
|
||||
Warning(eDLL_T::COMMON, "%s: Encountered command which overflows the argument buffer.. Clamped!\n", __FUNCTION__);
|
||||
Warning(eDLL_T::COMMON, "%s: Encountered command which overflows the argument buffer... Clamped!\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
nArgvBufferSize += nSize + 1;
|
||||
@ -195,7 +195,7 @@ bool CCommand::HasOnlyDigits(int nIndex) const
|
||||
|
||||
for (size_t i = 0; source[i] != '\0'; i++)
|
||||
{
|
||||
if (!isdigit(source[i]))
|
||||
if (!V_isdigit(source[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -476,7 +476,6 @@ void CMemoryStack::PrintContents() const
|
||||
return;
|
||||
}
|
||||
|
||||
const size_t highest = m_pHighestAllocLimit - m_pBase;
|
||||
MEMORY_BASIC_INFORMATION info;
|
||||
char moduleName[260];
|
||||
strcpy( moduleName, "unknown module" );
|
||||
@ -491,5 +490,5 @@ void CMemoryStack::PrintContents() const
|
||||
DevMsg( eDLL_T::COMMON, "CMemoryStack %s in %s\n", m_pszAllocOwner, moduleName );
|
||||
DevMsg( eDLL_T::COMMON, " Total used memory: %zu KB\n", GetUsed() / 1024 );
|
||||
DevMsg( eDLL_T::COMMON, " Total committed memory: %zu KB\n", GetSize() / 1024 );
|
||||
DevMsg( eDLL_T::COMMON, " Max committed memory: %zu KB out of %zu KB\n", highest / 1024, GetMaxSize() / 1024 );
|
||||
DevMsg( eDLL_T::COMMON, " Max committed memory: %zu KB out of %zu KB\n", (m_pHighestAllocLimit - m_pBase) / 1024, GetMaxSize() / 1024 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user