From c475ee1dec8c048f8aee06f9c38c8cc4389c3a53 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Wed, 6 Mar 2013 19:01:19 -0500 Subject: [PATCH] Use standard library min/max --- Core/src/TexComp.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Core/src/TexComp.cpp b/Core/src/TexComp.cpp index 7cd4ca9..4618a41 100644 --- a/Core/src/TexComp.cpp +++ b/Core/src/TexComp.cpp @@ -43,10 +43,11 @@ #include "TexComp.h" -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "BC7Compressor.h" #include "Thread.h" @@ -57,19 +58,9 @@ #include "Image.h" -template -static T min(const T &a, const T &b) { - return (a < b)? a : b; -} - -template -static T max(const T &a, const T &b) { - return (a > b)? a : b; -} - template static void clamp(T &x, const T &minX, const T &maxX) { - x = max(min(maxX, x), minX); + x = std::max(std::min(maxX, x), minX); } template @@ -111,7 +102,7 @@ static CompressionFunc ChooseFuncFromSettings(const SCompressionSettings &s) { BC7C::SetQualityLevel(s.iQuality); #ifdef HAS_SSE_41 if(s.bUseSIMD) { - return BC7C::CompressImageBC7SIMD; + return BC7C::CompressImageBC7SIMD; } else { #endif