Fix compilation under MSVC(VS2019)

This commit is contained in:
JusicP
2022-01-13 16:18:38 +02:00
parent 94fb7d4c00
commit 5e27785d40
127 changed files with 195 additions and 95 deletions
+2 -2
View File
@@ -83,12 +83,12 @@ public:
return _color[index];
}
bool operator == (const Color &rhs)
bool operator == (const Color &rhs) const
{
return Q_memcmp( this, &rhs, sizeof(Color) ) == 0;
}
bool operator != (const Color &rhs)
bool operator != (const Color &rhs) const
{
return !(operator==(rhs));
}
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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 )