Fix errors when compiling with -Wall -Werror on Android.
This CL also turns those features on by default on Android
Review URL: https://codereview.appspot.com/7313049
git-svn-id: http://skia.googlecode.com/svn/trunk/include@7645 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkFloatingPoint.h b/core/SkFloatingPoint.h
index 96270b0..02880f3 100644
--- a/core/SkFloatingPoint.h
+++ b/core/SkFloatingPoint.h
@@ -91,7 +91,7 @@
extern const uint32_t gIEEEInfinity;
extern const uint32_t gIEEENegativeInfinity;
-#define SK_FloatNaN (*reinterpret_cast<const float*>(&gIEEENotANumber))
-#define SK_FloatInfinity (*reinterpret_cast<const float*>(&gIEEEInfinity))
-#define SK_FloatNegativeInfinity (*reinterpret_cast<const float*>(&gIEEENegativeInfinity))
+#define SK_FloatNaN (*SkTCast<const float*>(&gIEEENotANumber))
+#define SK_FloatInfinity (*SkTCast<const float*>(&gIEEEInfinity))
+#define SK_FloatNegativeInfinity (*SkTCast<const float*>(&gIEEENegativeInfinity))
#endif
diff --git a/utils/SkRandom.h b/utils/SkRandom.h
index 150384d..6ab1cd1 100644
--- a/utils/SkRandom.h
+++ b/utils/SkRandom.h
@@ -197,7 +197,7 @@
*/
float nextF() {
unsigned int floatint = 0x3f800000 | (this->nextU() >> 9);
- float f = *(float*)(&floatint) - 1.0f;
+ float f = *SkTCast<float*>(&floatint) - 1.0f;
return f;
}