diff options
author | 2015-07-08 03:15:47 +0000 | |
---|---|---|
committer | 2015-07-08 03:15:47 +0000 | |
commit | 43b42d8bdb4ce39db48f985dfb4ae5a836b71b3b (patch) | |
tree | 73cd61d9208761578ea69b873fb8a67c1fdb629f /libs/hwui/Properties.cpp | |
parent | 776a4bfdab277c7f845d500f9f5d9f8c87963f92 (diff) | |
parent | 41e4d8b3ed044ed724bc340b77d3f9ca60105407 (diff) |
am 41e4d8b3: am 0c218e43: am 9ca926ad: am fdb87b76: am 127b478a: Merge "Remove all usage of fmin and fmax" into mnc-dev
* commit '41e4d8b3ed044ed724bc340b77d3f9ca60105407':
Remove all usage of fmin and fmax
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r-- | libs/hwui/Properties.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index 7dbe3b78839c..2e63793f6ffe 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -17,7 +17,7 @@ #include "Debug.h" -#include <cmath> +#include <algorithm> #include <cutils/log.h> namespace android { @@ -117,19 +117,19 @@ void Properties::overrideProperty(const char* name, const char* value) { ALOGD("profile bars %s", sDisableProfileBars ? "disabled" : "enabled"); return; } else if (!strcmp(name, "ambientRatio")) { - overrideAmbientRatio = fmin(fmax(atof(value), 0.0), 10.0); + overrideAmbientRatio = std::min(std::max(atof(value), 0.0), 10.0); ALOGD("ambientRatio = %.2f", overrideAmbientRatio); return; } else if (!strcmp(name, "lightRadius")) { - overrideLightRadius = fmin(fmax(atof(value), 0.0), 3000.0); + overrideLightRadius = std::min(std::max(atof(value), 0.0), 3000.0); ALOGD("lightRadius = %.2f", overrideLightRadius); return; } else if (!strcmp(name, "lightPosY")) { - overrideLightPosY = fmin(fmax(atof(value), 0.0), 3000.0); + overrideLightPosY = std::min(std::max(atof(value), 0.0), 3000.0); ALOGD("lightPos Y = %.2f", overrideLightPosY); return; } else if (!strcmp(name, "lightPosZ")) { - overrideLightPosZ = fmin(fmax(atof(value), 0.0), 3000.0); + overrideLightPosZ = std::min(std::max(atof(value), 0.0), 3000.0); ALOGD("lightPos Z = %.2f", overrideLightPosZ); return; } else if (!strcmp(name, "ambientShadowStrength")) { |