diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-01-16 16:21:28 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-01-16 16:21:28 +0000 |
commit | c990603b787fd573af8a5733535010020a7eb102 (patch) | |
tree | d433a4a876ac09587b67b75cd3141b88e8e80609 /src/core/SkMath.cpp | |
parent | 4cb8bd18d9449328f4d27f22ad4045ecf2aa06bd (diff) |
make these compile w/o SK_CAN_USE_FLOAT
git-svn-id: http://skia.googlecode.com/svn/trunk@70 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkMath.cpp')
-rw-r--r-- | src/core/SkMath.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkMath.cpp b/src/core/SkMath.cpp index 2655586e1a..e0babeb5e7 100644 --- a/src/core/SkMath.cpp +++ b/src/core/SkMath.cpp @@ -576,6 +576,7 @@ static int symmetric_fixmul(int a, int b) { #ifdef SK_SUPPORT_UNITTEST static void check_length(const SkPoint& p, SkScalar targetLen) { +#ifdef SK_CAN_USE_FLOAT float x = SkScalarToFloat(p.fX); float y = SkScalarToFloat(p.fY); float len = sk_float_sqrt(x*x + y*y); @@ -583,6 +584,7 @@ static void check_length(const SkPoint& p, SkScalar targetLen) { len /= SkScalarToFloat(targetLen); SkASSERT(len > 0.999f && len < 1.001f); +#endif } #endif @@ -698,6 +700,7 @@ static void unittest_fastfloat() { #ifdef SK_SUPPORT_UNITTEST static void test_muldiv255() { +#ifdef SK_CAN_USE_FLOAT for (int a = 0; a <= 255; a++) { for (int b = 0; b <= 255; b++) { int ab = a * b; @@ -716,6 +719,7 @@ static void test_muldiv255() { SkASSERT(iround <= b); } } +#endif } #endif |