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

Unified Diff: src/utils/SkDashPath.cpp

Issue 1503423003: ubsan shift fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add cast to work around win compiler Created 5 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 | « src/ports/SkFontMgr_android_parser.h ('k') | tests/MathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDashPath.cpp
diff --git a/src/utils/SkDashPath.cpp b/src/utils/SkDashPath.cpp
index e0cbe9732d24f1ce888e80abe8708851246cec8e..4e34b87eac1b09cb71b20b665ede3de2ed293155 100644
--- a/src/utils/SkDashPath.cpp
+++ b/src/utils/SkDashPath.cpp
@@ -10,7 +10,7 @@
#include "SkStrokeRec.h"
static inline int is_even(int x) {
- return (~x) << 31;
+ return !(x & 1);
}
static SkScalar find_first_interval(const SkScalar intervals[], SkScalar phase,
« no previous file with comments | « src/ports/SkFontMgr_android_parser.h ('k') | tests/MathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698