Remove unused min/max definitions.
BUG=17878699
Change-Id: If48ef9b43e140e9f43687edf55928d932247d513
Reviewed-on: https://swiftshader-review.googlesource.com/1201
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Common/Math.hpp b/src/Common/Math.hpp
index 5631bd6..a219dba 100644
--- a/src/Common/Math.hpp
+++ b/src/Common/Math.hpp
@@ -29,66 +29,18 @@
#undef min
#undef max
- inline float max(float a, float b)
+ template<class T>
+ inline T max(T a, T b)
{
return a > b ? a : b;
}
- inline float min(float a, float b)
+ template<class T>
+ inline T min(T a, T b)
{
return a < b ? a : b;
}
- inline float max(float a, float b, float c)
- {
- return max(max(a, b), c);
- }
-
- inline float min(float a, float b, float c)
- {
- return min(min(a, b), c);
- }
-
- inline float max(float a, float b, float c, float d)
- {
- return max(max(a, b), max(c, d));
- }
-
- inline float min(float a, float b, float c, float d)
- {
- return min(min(a, b), min(c, d));
- }
-
- inline int max(int a, int b)
- {
- return a > b ? a : b;
- }
-
- inline int min(int a, int b)
- {
- return a < b ? a : b;
- }
-
- inline int max(int a, int b, int c)
- {
- return max(max(a, b), c);
- }
-
- inline int min(int a, int b, int c)
- {
- return min(min(a, b), c);
- }
-
- inline int max(int a, int b, int c, int d)
- {
- return max(max(a, b), max(c, d));
- }
-
- inline int min(int a, int b, int c, int d)
- {
- return min(min(a, b), min(c, d));
- }
-
template<class T>
inline void swap(T &a, T &b)
{
diff --git a/src/GLES2/libGLESv2/Device.hpp b/src/GLES2/libGLESv2/Device.hpp
index dcee30f..4e0337d 100644
--- a/src/GLES2/libGLESv2/Device.hpp
+++ b/src/GLES2/libGLESv2/Device.hpp
@@ -88,9 +88,9 @@
sw::VertexShader *vertexShader;
bool pixelShaderDirty;
- int pixelShaderConstantsFDirty;
+ unsigned int pixelShaderConstantsFDirty;
bool vertexShaderDirty;
- int vertexShaderConstantsFDirty;
+ unsigned int vertexShaderConstantsFDirty;
float pixelShaderConstantF[224][4];
float vertexShaderConstantF[256][4];