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

Unified Diff: bench/MathBench.cpp

Issue 1511643002: spin off remaining integer overflow fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | gyp/sfntly.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MathBench.cpp
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index a5cc033c6fc63f72c9d4f707da1a69533190413f..fb35a8aafec786df3967e2af4f1343afb8a7c722 100644
--- a/bench/MathBench.cpp
+++ b/bench/MathBench.cpp
@@ -126,7 +126,7 @@ private:
static inline float SkFastInvSqrt(float x) {
float xhalf = 0.5f*x;
- int i = *SkTCast<int*>(&x);
+ uint32_t i = *SkTCast<uint32_t*>(&x);
i = 0x5f3759df - (i>>1);
x = *SkTCast<float*>(&i);
x = x*(1.5f-xhalf*x*x);
« no previous file with comments | « no previous file | gyp/sfntly.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698