mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
Fix compilation under MSVC(VS2019)
This commit is contained in:
@@ -383,7 +383,7 @@ public:
|
||||
|
||||
#pragma warning(disable:4290)
|
||||
#pragma warning(push)
|
||||
#include <typeinfo.h>
|
||||
#include <typeinfo>
|
||||
|
||||
// MEM_DEBUG_CLASSNAME is opt-in.
|
||||
// Note: typeid().name() is not threadsafe, so if the project needs to access it in multiple threads
|
||||
|
||||
@@ -203,12 +203,12 @@ ALLOC_CALL void *_realloc_base( void *pMem, size_t nSize )
|
||||
return ReallocUnattributed( pMem, nSize );
|
||||
}
|
||||
|
||||
ALLOC_CALL void *_recalloc_base( void *pMem, size_t nSize )
|
||||
ALLOC_CALL void *_recalloc_base( void *pMem, size_t nCount, size_t nSize )
|
||||
{
|
||||
void *pMemOut = ReallocUnattributed( pMem, nSize );
|
||||
void *pMemOut = ReallocUnattributed( pMem, nCount * nSize );
|
||||
if ( !pMem )
|
||||
{
|
||||
memset( pMemOut, 0, nSize );
|
||||
memset( pMemOut, 0, nCount * nSize);
|
||||
}
|
||||
return pMemOut;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ void * __cdecl _realloc_crt(void *ptr, size_t size)
|
||||
|
||||
void * __cdecl _recalloc_crt(void *ptr, size_t count, size_t size)
|
||||
{
|
||||
return _recalloc_base( ptr, size * count );
|
||||
return _recalloc_base( ptr, size, count );
|
||||
}
|
||||
|
||||
ALLOC_CALL void * __cdecl _recalloc ( void * memblock, size_t count, size_t size )
|
||||
|
||||
Reference in New Issue
Block a user