Explicitly expand size_t on min and max overload
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ void ActorFrame::AddChild( Actor *pActor )
|
||||
#endif
|
||||
|
||||
ASSERT( pActor != nullptr );
|
||||
ASSERT( (void*)pActor != (void*)0xC0000005 );
|
||||
ASSERT( reinterpret_cast<uintptr_t>(pActor) != static_cast<uintptr_t>(0xC0000005) );
|
||||
m_SubActors.push_back( pActor );
|
||||
|
||||
pActor->SetParent( this );
|
||||
|
||||
+2
-2
@@ -31,10 +31,10 @@ inline float max( float a, int b ) { return a > b? a:b; }
|
||||
inline float max( int a, float b ) { return a > b? a:b; }
|
||||
inline unsigned long min( unsigned int a, unsigned long b ) { return a < b? a:b; }
|
||||
inline unsigned long min( unsigned long a, unsigned int b ) { return a < b? a:b; }
|
||||
inline size_t min( unsigned int a, size_t b ) { return a < b? a:b; }
|
||||
inline unsigned long long min( unsigned int a, unsigned long long b ) { return a < b? a:b; }
|
||||
inline unsigned long max( unsigned int a, unsigned long b ) { return a > b? a:b; }
|
||||
inline unsigned long max( unsigned long a, unsigned int b ) { return a > b? a:b; }
|
||||
inline size_t max( unsigned int a, size_t b ) { return a > b? a:b; }
|
||||
inline unsigned long long max( unsigned int a, unsigned long long b ) { return a > b? a:b; }
|
||||
|
||||
/** @brief If outside the range from low to high, bring it within range. */
|
||||
#define clamp(val,low,high) ( max( (low), min((val),(high)) ) )
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace SymbolLookup
|
||||
return true;
|
||||
}
|
||||
|
||||
SYMBOL_INFO *GetSym( unsigned long ptr, DWORD64 &disp )
|
||||
SYMBOL_INFO *GetSym( uintptr_t ptr, DWORD64 &disp )
|
||||
{
|
||||
InitDbghelp();
|
||||
|
||||
@@ -370,14 +370,14 @@ namespace SymbolLookup
|
||||
RString sName = CrashChildGetModuleBaseName( (HMODULE)meminfo.AllocationBase );
|
||||
|
||||
DWORD64 disp;
|
||||
SYMBOL_INFO *pSymbol = GetSym( (unsigned int)ptr, disp );
|
||||
SYMBOL_INFO *pSymbol = GetSym( reinterpret_cast<uintptr_t>(ptr), disp );
|
||||
|
||||
if( pSymbol )
|
||||
{
|
||||
wsprintf( buf, "%p: %s!%s [%p+%Ix+%Ix]",
|
||||
ptr, sName.c_str(), pSymbol->Name,
|
||||
meminfo.AllocationBase,
|
||||
reinterpret_cast<uintptr_t>(pSymbol->Address) - reinterpret_cast<uintptr_t>(meminfo.AllocationBase),
|
||||
static_cast<uintptr_t>(pSymbol->Address) - reinterpret_cast<uintptr_t>(meminfo.AllocationBase),
|
||||
static_cast<ULONG_PTR>(disp));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user