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
|
#endif
|
||||||
|
|
||||||
ASSERT( pActor != nullptr );
|
ASSERT( pActor != nullptr );
|
||||||
ASSERT( (void*)pActor != (void*)0xC0000005 );
|
ASSERT( reinterpret_cast<uintptr_t>(pActor) != static_cast<uintptr_t>(0xC0000005) );
|
||||||
m_SubActors.push_back( pActor );
|
m_SubActors.push_back( pActor );
|
||||||
|
|
||||||
pActor->SetParent( this );
|
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 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 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 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 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 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. */
|
/** @brief If outside the range from low to high, bring it within range. */
|
||||||
#define clamp(val,low,high) ( max( (low), min((val),(high)) ) )
|
#define clamp(val,low,high) ( max( (low), min((val),(high)) ) )
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ namespace SymbolLookup
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SYMBOL_INFO *GetSym( unsigned long ptr, DWORD64 &disp )
|
SYMBOL_INFO *GetSym( uintptr_t ptr, DWORD64 &disp )
|
||||||
{
|
{
|
||||||
InitDbghelp();
|
InitDbghelp();
|
||||||
|
|
||||||
@@ -370,14 +370,14 @@ namespace SymbolLookup
|
|||||||
RString sName = CrashChildGetModuleBaseName( (HMODULE)meminfo.AllocationBase );
|
RString sName = CrashChildGetModuleBaseName( (HMODULE)meminfo.AllocationBase );
|
||||||
|
|
||||||
DWORD64 disp;
|
DWORD64 disp;
|
||||||
SYMBOL_INFO *pSymbol = GetSym( (unsigned int)ptr, disp );
|
SYMBOL_INFO *pSymbol = GetSym( reinterpret_cast<uintptr_t>(ptr), disp );
|
||||||
|
|
||||||
if( pSymbol )
|
if( pSymbol )
|
||||||
{
|
{
|
||||||
wsprintf( buf, "%p: %s!%s [%p+%Ix+%Ix]",
|
wsprintf( buf, "%p: %s!%s [%p+%Ix+%Ix]",
|
||||||
ptr, sName.c_str(), pSymbol->Name,
|
ptr, sName.c_str(), pSymbol->Name,
|
||||||
meminfo.AllocationBase,
|
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));
|
static_cast<ULONG_PTR>(disp));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user