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

Unified Diff: include/core/SkPoint.h

Issue 809443002: Rewrite NaN checks in terms of SkScalarIsNaN() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | include/core/SkRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPoint.h
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 323c824a1b0e10d523cb2305cd8f0d5de9f4f2a8..4a97391c70e7d71a3029367ce2483a58134b32a5 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -357,11 +357,11 @@ struct SK_API SkPoint {
accum *= fY;
// accum is either NaN or it is finite (zero).
- SkASSERT(0 == accum || !(accum == accum));
+ SkASSERT(0 == accum || SkScalarIsNaN(accum));
// value==value will be true iff value is not NaN
// TODO: is it faster to say !accum or accum==accum?
- return accum == accum;
+ return !SkScalarIsNaN(accum);
}
/**
« no previous file with comments | « no previous file | include/core/SkRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698