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:29:36 -05:00
parent 94dd57587b
commit 79f4a53df6
300 changed files with 1041 additions and 1084 deletions

View File

@ -17,7 +17,7 @@
#include <tier0/memdbgon.h>
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
using namespace vgui;
@ -91,13 +91,13 @@ void QueryBox::PerformLayout()
int btnWide, btnTall;
m_pCancelButton->GetContentSize(btnWide, btnTall);
btnWide = max(oldWide, btnWide + 10);
btnTall = max(oldTall, btnTall + 10);
btnWide = MAX(oldWide, btnWide + 10);
btnTall = MAX(oldTall, btnTall + 10);
m_pCancelButton->SetSize(btnWide, btnTall);
//nt boxWidth, boxTall;
GetSize(boxWidth, boxTall);
// wide = max(wide, btnWide * 2 + 100);
// wide = MAX(wide, btnWide * 2 + 100);
// SetSize(wide, tall);
m_pOkButton->SetPos((wide/2)-(m_pOkButton->GetWide())-1 + x, tall - m_pOkButton->GetTall() - 15);