aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkFloatingPoint.h
diff options
context:
space:
mode:
authorGravatar ehsan.akhgari <ehsan.akhgari@gmail.com>2014-09-12 12:30:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-12 12:30:35 -0700
commitc34b0d4e9ad5806c1f882a1f85191f2ea8ddcdba (patch)
tree3bd4a7eddc8ddfc54d8d04231456f527c548d7e5 /include/core/SkFloatingPoint.h
parent9db509272a6fa2badbbdd2f5afce827370960a5f (diff)
Do not expect a copysign function to be defined in <cmath> with clang-cl
clang-cl defines __cplusplus to 201103L, but it uses the runtime library provided by MSVC, so the copysign function will not be available there. BUG=skia: R=reed@google.com Author: ehsan.akhgari@gmail.com Review URL: https://codereview.chromium.org/526813002
Diffstat (limited to 'include/core/SkFloatingPoint.h')
-rw-r--r--include/core/SkFloatingPoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h
index 5489bac215..93d479cf87 100644
--- a/include/core/SkFloatingPoint.h
+++ b/include/core/SkFloatingPoint.h
@@ -31,7 +31,7 @@ static inline float sk_float_pow(float base, float exp) {
static inline float sk_float_copysign(float x, float y) {
// c++11 contains a 'float copysign(float, float)' function in <cmath>.
-#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
+#if (!defined(_MSC_VER) && __cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
return copysign(x, y);
// Posix has demanded 'float copysignf(float, float)' (from C99) since Issue 6.