summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_util.cpp
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 /core/fxcrt/fx_basic_util.cpp
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 'core/fxcrt/fx_basic_util.cpp')
-rw-r--r--core/fxcrt/fx_basic_util.cpp13
1 files changed, 6 insertions, 7 deletions
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<FX_FLOAT*>(pData);
+ float* pFloat = static_cast<float*>(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();