diff options
author | bungeman <bungeman@google.com> | 2016-03-10 11:14:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-10 11:14:40 -0800 |
commit | d7dc76f7e99309cbd09a5420c22e55b951067deb (patch) | |
tree | ca291b2cdfd909c38bdc9befe017e959ec0cef2b /include/private/SkFloatingPoint.h | |
parent | cf371bb41b4a0591347a076ce7d83336d4bbc6fb (diff) |
Remove version checks for _MSC_VER < 1800 (msvs2013).
We already actively do not support older versions of the vc++
compiler and runtime, so don't check for them anymore.
TBR=reed
No API changes.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777213003
Review URL: https://codereview.chromium.org/1777213003
Diffstat (limited to 'include/private/SkFloatingPoint.h')
-rw-r--r-- | include/private/SkFloatingPoint.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h index ffed5c0747..efaf4109f1 100644 --- a/include/private/SkFloatingPoint.h +++ b/include/private/SkFloatingPoint.h @@ -29,33 +29,6 @@ static inline float sk_float_pow(float base, float exp) { return powf(base, exp); } -static inline float sk_float_copysign(float x, float y) { -// c++11 contains a 'float copysign(float, float)' function in <cmath>. -// clang-cl reports __cplusplus for clang, not the __cplusplus vc++ version _MSC_VER would report. -#if (defined(_MSC_VER) && defined(__clang__)) -# define SK_BUILD_WITH_CLANG_CL 1 -#else -# define SK_BUILD_WITH_CLANG_CL 0 -#endif -#if (!SK_BUILD_WITH_CLANG_CL && __cplusplus >= 201103L) || (_MSC_VER >= 1800) - return copysignf(x, y); - -// Posix has demanded 'float copysignf(float, float)' (from C99) since Issue 6. -#elif defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L - return copysignf(x, y); - -// Visual studio prior to 13 only has 'double _copysign(double, double)'. -#elif defined(_MSC_VER) - return (float)_copysign(x, y); - -// Otherwise convert to bits and extract sign. -#else - int32_t xbits = SkFloat2Bits(x); - int32_t ybits = SkFloat2Bits(y); - return SkBits2Float((xbits & 0x7FFFFFFF) | (ybits & 0x80000000)); -#endif -} - #define sk_float_sqrt(x) sqrtf(x) #define sk_float_sin(x) sinf(x) #define sk_float_cos(x) cosf(x) @@ -71,6 +44,7 @@ static inline float sk_float_copysign(float x, float y) { #endif #define sk_float_atan2(y,x) atan2f(y,x) #define sk_float_abs(x) fabsf(x) +#define sk_float_copysign(x, y) copysignf(x, y) #define sk_float_mod(x,y) fmodf(x,y) #define sk_float_exp(x) expf(x) #define sk_float_log(x) logf(x) |