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_wstring.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fxcrt/fx_basic_wstring.cpp') diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index 3b9fa2435c..8522d42a38 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -945,7 +945,7 @@ void CFX_WideString::TrimLeft(wchar_t chTarget) { void CFX_WideString::TrimLeft() { TrimLeft(L"\x09\x0a\x0b\x0c\x0d\x20"); } -FX_FLOAT FX_wtof(const wchar_t* str, int len) { +float FX_wtof(const wchar_t* str, int len) { if (len == 0) { return 0.0; } @@ -965,17 +965,17 @@ FX_FLOAT FX_wtof(const wchar_t* str, int len) { integer = integer * 10 + FXSYS_toDecimalDigit(str[cc]); cc++; } - FX_FLOAT fraction = 0; + float fraction = 0; if (str[cc] == '.') { cc++; - FX_FLOAT scale = 0.1f; + float scale = 0.1f; while (cc < len) { fraction += scale * FXSYS_toDecimalDigit(str[cc]); scale *= 0.1f; cc++; } } - fraction += (FX_FLOAT)integer; + fraction += (float)integer; return bNegative ? -fraction : fraction; } @@ -983,7 +983,7 @@ int CFX_WideString::GetInteger() const { return m_pData ? FXSYS_wtoi(m_pData->m_String) : 0; } -FX_FLOAT CFX_WideString::GetFloat() const { +float CFX_WideString::GetFloat() const { return m_pData ? FX_wtof(m_pData->m_String, m_pData->m_nDataLength) : 0.0f; } -- cgit v1.2.3