mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 20:46:03 +08:00
Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.
This commit is contained in:
@ -219,8 +219,8 @@ int FindDiffsForLargeFiles(uint8 const *NewBlock, uint8 const *OldBlock,
|
||||
int match_of=b->dataptr-lastmatchend;
|
||||
if ((match_of>-32768) && (match_of<32767))
|
||||
{
|
||||
int max_mlength=min(65535,OldBlock+OldSize-b->dataptr);
|
||||
max_mlength=min(max_mlength,NewBlock+NewSize-walk);
|
||||
int max_mlength=MIN(65535,OldBlock+OldSize-b->dataptr);
|
||||
max_mlength=MIN(max_mlength,NewBlock+NewSize-walk);
|
||||
int i;
|
||||
for(i=0;i<max_mlength;i++)
|
||||
if (walk[i]!=b->dataptr[i])
|
||||
@ -355,8 +355,8 @@ int FindDiffs(uint8 const *NewBlock, uint8 const *OldBlock,
|
||||
int match_of=b->dataptr-lastmatchend;
|
||||
if ((match_of>-32768) && (match_of<32767))
|
||||
{
|
||||
int max_mlength=min(65535,OldBlock+OldSize-b->dataptr);
|
||||
max_mlength=min(max_mlength,NewBlock+NewSize-walk);
|
||||
int max_mlength=MIN(65535,OldBlock+OldSize-b->dataptr);
|
||||
max_mlength=MIN(max_mlength,NewBlock+NewSize-walk);
|
||||
int i;
|
||||
for(i=0;i<max_mlength;i++)
|
||||
if (walk[i]!=b->dataptr[i])
|
||||
@ -467,7 +467,7 @@ int FindDiffsLowMemory(uint8 const *NewBlock, uint8 const *OldBlock,
|
||||
uint16 hash1=(walk[0]+walk[1]+walk[2]+walk[3]) & (NELEMS(old_data_hash)-1);
|
||||
if (old_data_hash[hash1])
|
||||
{
|
||||
int max_bytes_to_compare=min(NewBlock+NewSize-walk,OldBlock+OldSize-old_data_hash[hash1]);
|
||||
int max_bytes_to_compare=MIN(NewBlock+NewSize-walk,OldBlock+OldSize-old_data_hash[hash1]);
|
||||
int nmatches;
|
||||
for(nmatches=0;nmatches<max_bytes_to_compare;nmatches++)
|
||||
if (walk[nmatches]!=old_data_hash[hash1][nmatches])
|
||||
|
Reference in New Issue
Block a user