diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-26 13:08:56 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-26 13:08:56 +0000 |
commit | 373ebc634573364c27b1ebd35bb537ef1285cba4 (patch) | |
tree | de677b3d81e81875c85dee3c838959425057a9f7 /bench/MathBench.cpp | |
parent | 5c83dcc371b68e4cda2d533e247684ea1a32d1bc (diff) |
Suppress some warnings on linux.
R=reed@google.com
Review URL: https://codereview.appspot.com/6572046
git-svn-id: http://skia.googlecode.com/svn/trunk@5687 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/MathBench.cpp')
-rw-r--r-- | bench/MathBench.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index df3d3a53c2..bdb89cab62 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -110,9 +110,9 @@ private: static inline float SkFastInvSqrt(float x) { float xhalf = 0.5f*x; - int i = *(int*)&x; + int i = *SkTCast<int*>(&x); i = 0x5f3759df - (i>>1); - x = *(float*)&i; + x = *SkTCast<float*>(&i); x = x*(1.5f-xhalf*x*x); // x = x*(1.5f-xhalf*x*x); // this line takes err from 10^-3 to 10^-6 return x; |