From b817e3bf26fe1905b4b688e9148742f51bec3e6c Mon Sep 17 00:00:00 2001 From: Sacha Date: Sun, 10 Feb 2013 23:01:18 +1000 Subject: [PATCH] Update max to std::max --- Common/Hash.cpp | 12 ++++++------ Core/HLE/scePsmf.cpp | 2 +- GPU/GLES/TransformPipeline.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Common/Hash.cpp b/Common/Hash.cpp index fae83fa8f..3015668d7 100644 --- a/Common/Hash.cpp +++ b/Common/Hash.cpp @@ -167,7 +167,7 @@ u64 GetMurmurHash3(const u8 *src, int len, u32 samples) const u8 * data = (const u8*)src; const int nblocks = len / 16; u32 Step = (len / 8); - if(samples == 0) samples = max(Step, 1u); + if(samples == 0) samples = std::max(Step, 1u); Step = Step / samples; if(Step < 1) Step = 1; @@ -245,7 +245,7 @@ u64 GetCRC32(const u8 *src, int len, u32 samples) u32 Step = (len / 8); const u64 *data = (const u64 *)src; const u64 *end = data + Step; - if(samples == 0) samples = max(Step, 1u); + if(samples == 0) samples = std::max(Step, 1u); Step = Step / samples; if(Step < 1) Step = 1; while(data < end) @@ -275,7 +275,7 @@ u64 GetHashHiresTexture(const u8 *src, int len, u32 samples) u32 Step = (len / 8); const u64 *data = (const u64 *)src; const u64 *end = data + Step; - if(samples == 0) samples = max(Step, 1u); + if(samples == 0) samples = std::max(Step, 1u); Step = Step / samples; if(Step < 1) Step = 1; while(data < end) @@ -318,7 +318,7 @@ u64 GetCRC32(const u8 *src, int len, u32 samples) u32 Step = (len/4); const u32 *data = (const u32 *)src; const u32 *end = data + Step; - if(samples == 0) samples = max(Step, 1u); + if(samples == 0) samples = std::max(Step, 1u); Step = Step / samples; if(Step < 1) Step = 1; while(data < end) @@ -390,7 +390,7 @@ u64 GetMurmurHash3(const u8* src, int len, u32 samples) u32 out[2]; const int nblocks = len / 8; u32 Step = (len / 4); - if(samples == 0) samples = max(Step, 1u); + if(samples == 0) samples = std::max(Step, 1u); Step = Step / samples; if(Step < 1) Step = 1; @@ -464,7 +464,7 @@ u64 GetHashHiresTexture(const u8 *src, int len, u32 samples) u32 Step = (len / 8); const u64 *data = (const u64 *)src; const u64 *end = data + Step; - if(samples == 0) samples = max(Step, 1u); + if(samples == 0) samples = std::max(Step, 1u); Step = Step / samples; if(Step < 1) Step = 1; while(data < end) diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index 7259539ee..225133500 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -91,7 +91,7 @@ struct PsmfEntry { int id; }; -int getMaxAheadTimestamp(int packets) {return max(40000, packets * 700);} +int getMaxAheadTimestamp(int packets) {return std::max(40000, packets * 700);} class PsmfStream; diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 2e61fe289..8820dd0e9 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -262,7 +262,7 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ } Color4 lightDiff(gstate_c.lightColor[1][l], 0.0f); - Color4 diff = (lightDiff * *diffuse) * (max(dot, 0.0f) * lightScale); + Color4 diff = (lightDiff * *diffuse) * (std::max(dot, 0.0f) * lightScale); // Real PSP specular Vec3 toViewer(0,0,1);