diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-14 14:43:42 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 19:05:58 +0000 |
commit | 05df075154a832fcb476e1dfcfb865722d0ea898 (patch) | |
tree | b8b771b62adae74d5d5ee561db75d10de3a848bf /core/fxcrt/fx_basic_wstring.cpp | |
parent | 6b94f01d1c8ad386d497428c7397b1a99614aeba (diff) | |
download | pdfium-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 'core/fxcrt/fx_basic_wstring.cpp')
-rw-r--r-- | core/fxcrt/fx_basic_wstring.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |