From: Nicolas Capens Date: Thu, 16 Oct 2014 04:07:21 +0000 (-0400) Subject: Remove unused min/max definitions. X-Git-Tag: android-x86-7.1-r1~1417 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=77278999f502e034116ab8d69f2ecffb07bbba32;p=android-x86%2Fexternal-swiftshader.git Remove unused min/max definitions. BUG=17878699 Change-Id: If48ef9b43e140e9f43687edf55928d932247d513 Reviewed-on: https://swiftshader-review.googlesource.com/1201 Reviewed-by: Nicolas Capens Tested-by: Nicolas Capens --- diff --git a/src/Common/Math.hpp b/src/Common/Math.hpp index 5631bd6b9..a219dba5f 100644 --- a/src/Common/Math.hpp +++ b/src/Common/Math.hpp @@ -29,66 +29,18 @@ namespace sw #undef min #undef max - inline float max(float a, float b) - { - return a > b ? a : b; - } - - inline float min(float a, float 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) + template + inline T max(T a, T b) { return a > b ? a : b; } - inline int min(int a, int b) + template + inline T min(T a, T 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 inline void swap(T &a, T &b) { diff --git a/src/GLES2/libGLESv2/Device.hpp b/src/GLES2/libGLESv2/Device.hpp index dcee30fec..4e0337d85 100644 --- a/src/GLES2/libGLESv2/Device.hpp +++ b/src/GLES2/libGLESv2/Device.hpp @@ -88,9 +88,9 @@ namespace gl 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];