mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-08 05:55:35 +00:00
Use standard library min/max
This commit is contained in:
parent
53fe825e49
commit
c475ee1dec
|
@ -43,10 +43,11 @@
|
|||
|
||||
#include "TexComp.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
|
||||
#include "BC7Compressor.h"
|
||||
#include "Thread.h"
|
||||
|
@ -57,19 +58,9 @@
|
|||
#include "Image.h"
|
||||
|
||||
|
||||
template <typename T>
|
||||
static T min(const T &a, const T &b) {
|
||||
return (a < b)? a : b;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static T max(const T &a, const T &b) {
|
||||
return (a > b)? a : b;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
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 <typename T>
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue