From 05df075154a832fcb476e1dfcfb865722d0ea898 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Mar 2017 14:43:42 -0400 Subject: Replace FX_FLOAT with underlying float type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair Reviewed-by: Tom Sepez Reviewed-by: Nicolás Peña --- core/fxcrt/fx_basic_util.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'core/fxcrt/fx_basic_util.cpp') diff --git a/core/fxcrt/fx_basic_util.cpp b/core/fxcrt/fx_basic_util.cpp index 45543dc317..b3c5829fc9 100644 --- a/core/fxcrt/fx_basic_util.cpp +++ b/core/fxcrt/fx_basic_util.cpp @@ -14,7 +14,7 @@ bool FX_atonum(const CFX_ByteStringC& strc, void* pData) { if (strc.Find('.') != -1) { - FX_FLOAT* pFloat = static_cast(pData); + float* pFloat = static_cast(pData); *pFloat = FX_atof(strc); return false; } @@ -69,7 +69,7 @@ bool FX_atonum(const CFX_ByteStringC& strc, void* pData) { return true; } -static const FX_FLOAT fraction_scales[] = { +static const float fraction_scales[] = { 0.1f, 0.01f, 0.001f, 0.0001f, 0.00001f, 0.000001f, 0.0000001f, 0.00000001f, 0.000000001f, 0.0000000001f, 0.00000000001f}; @@ -78,11 +78,11 @@ int FXSYS_FractionalScaleCount() { return FX_ArraySize(fraction_scales); } -FX_FLOAT FXSYS_FractionalScale(size_t scale_factor, int value) { +float FXSYS_FractionalScale(size_t scale_factor, int value) { return fraction_scales[scale_factor] * value; } -FX_FLOAT FX_atof(const CFX_ByteStringC& strc) { +float FX_atof(const CFX_ByteStringC& strc) { if (strc.IsEmpty()) return 0.0; @@ -100,7 +100,7 @@ FX_FLOAT FX_atof(const CFX_ByteStringC& strc) { break; cc++; } - FX_FLOAT value = 0; + float value = 0; while (cc < len) { if (strc[cc] == '.') break; @@ -206,8 +206,7 @@ wchar_t FX_GetFolderSeparator() { } CFX_Matrix_3by3 CFX_Matrix_3by3::Inverse() { - FX_FLOAT det = - a * (e * i - f * h) - b * (i * d - f * g) + c * (d * h - e * g); + float det = a * (e * i - f * h) - b * (i * d - f * g) + c * (d * h - e * g); if (FXSYS_fabs(det) < 0.0000001) return CFX_Matrix_3by3(); -- cgit v1.2.3