Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: tests/PathOpsAngleTest.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkRTConf.cpp ('k') | tests/PathOpsCubicIntersectionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsAngleTest.cpp
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp
index 9f9c321a42775d19a368373c20167c02ce403c06..cec8dde68abb3f80965b876884137aa186db0db5 100644
--- a/tests/PathOpsAngleTest.cpp
+++ b/tests/PathOpsAngleTest.cpp
@@ -51,7 +51,7 @@ DEF_TEST(PathOpsAngleFindCrossEpsilon, reporter) {
float p2 = SkDoubleToScalar(line[1].fY * test.fX);
int p1Bits = SkFloatAs2sCompliment(p1);
int p2Bits = SkFloatAs2sCompliment(p2);
- int epsilon = abs(p1Bits - p2Bits);
+ int epsilon = SkTAbs(p1Bits - p2Bits);
if (maxEpsilon < epsilon) {
SkDebugf("line={{0, 0}, {%1.7g, %1.7g}} t=%1.7g pt={%1.7g, %1.7g}"
" epsilon=%d\n",
@@ -104,7 +104,7 @@ DEF_TEST(PathOpsAngleFindQuadEpsilon, reporter) {
float p2 = SkDoubleToScalar(line[1].fY * last.fX);
int p1Bits = SkFloatAs2sCompliment(p1);
int p2Bits = SkFloatAs2sCompliment(p2);
- int epsilon = abs(p1Bits - p2Bits);
+ int epsilon = SkTAbs(p1Bits - p2Bits);
if (maxEpsilon < epsilon) {
SkDebugf("line={{0, 0}, {%1.7g, %1.7g}} t=%1.7g/%1.7g/%1.7g moveT=%1.7g"
" pt={%1.7g, %1.7g} epsilon=%d\n",
« no previous file with comments | « src/utils/SkRTConf.cpp ('k') | tests/PathOpsCubicIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698