summaryrefslogtreecommitdiff
path: root/third_party/agg23/0002-ubsan-error-fixes.patch
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-14 14:43:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 19:05:58 +0000
commit05df075154a832fcb476e1dfcfb865722d0ea898 (patch)
treeb8b771b62adae74d5d5ee561db75d10de3a848bf /third_party/agg23/0002-ubsan-error-fixes.patch
parent6b94f01d1c8ad386d497428c7397b1a99614aeba (diff)
downloadpdfium-05df075154a832fcb476e1dfcfb865722d0ea898.tar.xz
Replace FX_FLOAT with underlying float type.
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'third_party/agg23/0002-ubsan-error-fixes.patch')
-rw-r--r--third_party/agg23/0002-ubsan-error-fixes.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/third_party/agg23/0002-ubsan-error-fixes.patch b/third_party/agg23/0002-ubsan-error-fixes.patch
index 00ced0071c..58b17dc19c 100644
--- a/third_party/agg23/0002-ubsan-error-fixes.patch
+++ b/third_party/agg23/0002-ubsan-error-fixes.patch
@@ -13,21 +13,21 @@ index db6ca97..5b1261f 100644
@@ -36,8 +37,18 @@ inline unsigned clip_liang_barsky(T x1, T y1, T x2, T y2,
T* x, T* y)
{
- const FX_FLOAT nearzero = 1e-30f;
-- FX_FLOAT deltax = (FX_FLOAT)(x2 - x1);
-- FX_FLOAT deltay = (FX_FLOAT)(y2 - y1);
+ const float nearzero = 1e-30f;
+- float deltax = (float)(x2 - x1);
+- float deltay = (float)(y2 - y1);
+
-+ pdfium::base::CheckedNumeric<FX_FLOAT> width = x2;
++ pdfium::base::CheckedNumeric<float> width = x2;
+ width -= x1;
+ if (!width.IsValid())
+ return 0;
-+ pdfium::base::CheckedNumeric<FX_FLOAT> height = y2;
++ pdfium::base::CheckedNumeric<float> height = y2;
+ height -= y1;
+ if (!height.IsValid())
+ return 0;
+
-+ FX_FLOAT deltax = width.ValueOrDefault(0);
-+ FX_FLOAT deltay = height.ValueOrDefault(0);
++ float deltax = width.ValueOrDefault(0);
++ float deltay = height.ValueOrDefault(0);
unsigned np = 0;
if(deltax == 0) {
deltax = (x1 > clip_box.x1) ? -nearzero : nearzero;