fix double->float warning
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 5 May 2014 16:32:16 +0000 (16:32 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 5 May 2014 16:32:16 +0000 (16:32 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@14568 2bbb7eff-a529-9590-31e7-b0007b416f81

tests/ScalarTest.cpp

index 6b7fe6bfa02e259ed34529776fc71b0938086a10..b6f71d19bca35e465afcb4de6bb963e5c8312f0e 100644 (file)
@@ -13,7 +13,7 @@
 #include "Test.h"
 
 static void test_roundtoint(skiatest::Reporter* reporter) {
-    SkScalar x = 0.49999997;
+    SkScalar x = 0.49999997f;
     int ix = SkScalarRoundToInt(x);
     // We "should" get 0, since x < 0.5, but we don't due to float addition rounding up the low
     // bit after adding 0.5.