aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-08 18:26:08 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-08 18:26:08 +0000
commitbf083a9a2077e26b3e572aeafd6640156ad68e3b (patch)
treeff65b1c526a627725bd27ce44fe0aedee4568cfc
parente7ccdb3befa08c9db6542a0c7e7e75363098cec0 (diff)
fix windows compile errors in "tests"
git-svn-id: http://skia.googlecode.com/svn/trunk@1547 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--tests/MathTest.cpp2
-rw-r--r--tests/Reader32Test.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 7a9364f916..efdad3aca2 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -188,7 +188,7 @@ static float make_zero() {
static void unittest_isfinite(skiatest::Reporter* reporter) {
#ifdef SK_SCALAR_IS_FLOAT
- float nan = ::asin(2);
+ float nan = sk_float_asin(2);
float inf = 1.0 / make_zero();
float big = 3.40282e+038;
diff --git a/tests/Reader32Test.cpp b/tests/Reader32Test.cpp
index c752b0f123..cad2d33d66 100644
--- a/tests/Reader32Test.cpp
+++ b/tests/Reader32Test.cpp
@@ -52,7 +52,9 @@ static void Tests(skiatest::Reporter* reporter) {
const int32_t data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
const SkScalar data2[] = { 0, SK_Scalar1, -SK_Scalar1, SK_Scalar1/2 };
- char buffer[SkMax32(sizeof(data), sizeof(data2))];
+ const size_t bufsize = sizeof(data) > sizeof(data2) ?
+ sizeof(data) : sizeof(data2);
+ char buffer[bufsize];
reader.setMemory(data, sizeof(data));
for (i = 0; i < SK_ARRAY_COUNT(data); ++i) {