1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

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

This commit is contained in:
Scott Ehlert
2011-04-28 01:30:09 -05:00
parent b9b7f08197
commit 3e7f7bdabd
300 changed files with 1041 additions and 1084 deletions

View File

@ -17,7 +17,7 @@
#include "tier0/memdbgon.h"
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
using namespace vgui;
@ -89,7 +89,7 @@ void CBitmapImagePanel::ComputeImagePosition(int &x, int &y, int &w, int &h)
{
float xScale = (float)panelWide / (float)imageWide;
float yScale = (float)panelTall / (float)imageTall;
float scale = min( xScale, yScale );
float scale = MIN( xScale, yScale );
w = (int) (imageWide * scale);
h = (int) (imageTall * scale);