Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.

This commit is contained in:
Scott Ehlert committed 2011-04-28 01:30:37 -05:00
1 parent 6c38e2e589
commit 4caefcbcba
300 files changed
+1041 -1084

No files matched your search

+3 -3
View File
@@ -271,7 +271,7 @@ void CSprite::ComputeWorldSpaceSurroundingBox( Vector *pVecWorldMins, Vector *pV
// Find the height and width of the source of the sprite
float width = modelinfo->GetModelSpriteWidth( GetModel() );
float height = modelinfo->GetModelSpriteHeight( GetModel() );
flScale *= max( width, height );
flScale *= MAX( width, height );
}
pVecWorldMins->Init( -flScale, -flScale, -flScale );
@@ -669,7 +669,7 @@ void CSprite::GetRenderBounds( Vector &vecMins, Vector &vecMaxs )
CEngineSprite *psprite = (CEngineSprite *) modelinfo->GetModelExtraData( GetModel() );
if ( psprite )
{
float flSize = max( psprite->GetWidth(), psprite->GetHeight() );
float flSize = MAX( psprite->GetWidth(), psprite->GetHeight() );
flScale *= flSize;
}
}
@@ -786,7 +786,7 @@ int CSprite::DrawModel( int flags )
if ( m_bWorldSpaceScale )
{
CEngineSprite *psprite = ( CEngineSprite * )modelinfo->GetModelExtraData( GetModel() );
float flMinSize = min( psprite->GetWidth(), psprite->GetHeight() );
float flMinSize = MIN( psprite->GetWidth(), psprite->GetHeight() );
renderscale /= flMinSize;
}