summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_system.h
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_system.h
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_system.h')
-rw-r--r--core/fxcrt/fx_system.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h
index 4c938d9b27..321a8e272e 100644
--- a/core/fxcrt/fx_system.h
+++ b/core/fxcrt/fx_system.h
@@ -68,7 +68,6 @@ extern "C" {
#endif // __cplusplus
typedef void* FX_POSITION; // Keep until fxcrt containers gone
-typedef float FX_FLOAT; // Keep, allow upgrade to doubles.
#define IsFloatZero(f) ((f) < 0.0001 && (f) > -0.0001)
#define IsFloatBigger(fa, fb) ((fa) > (fb) && !IsFloatZero((fa) - (fb)))
@@ -247,21 +246,21 @@ wchar_t* FXSYS_wcsupr(wchar_t* str);
#endif // _FXM_PLATFORM == _FXM_PLATFORM_WINDOWS_
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-#define FXSYS_pow(a, b) (FX_FLOAT) powf(a, b)
+#define FXSYS_pow(a, b) (float)powf(a, b)
#else
-#define FXSYS_pow(a, b) (FX_FLOAT) pow(a, b)
+#define FXSYS_pow(a, b) (float)pow(a, b)
#endif
-#define FXSYS_sqrt(a) (FX_FLOAT) sqrt(a)
-#define FXSYS_fabs(a) (FX_FLOAT) fabs(a)
-#define FXSYS_atan2(a, b) (FX_FLOAT) atan2(a, b)
-#define FXSYS_ceil(a) (FX_FLOAT) ceil(a)
-#define FXSYS_floor(a) (FX_FLOAT) floor(a)
-#define FXSYS_cos(a) (FX_FLOAT) cos(a)
-#define FXSYS_acos(a) (FX_FLOAT) acos(a)
-#define FXSYS_sin(a) (FX_FLOAT) sin(a)
-#define FXSYS_log(a) (FX_FLOAT) log(a)
-#define FXSYS_log10(a) (FX_FLOAT) log10(a)
-#define FXSYS_fmod(a, b) (FX_FLOAT) fmod(a, b)
+#define FXSYS_sqrt(a) (float)sqrt(a)
+#define FXSYS_fabs(a) (float)fabs(a)
+#define FXSYS_atan2(a, b) (float)atan2(a, b)
+#define FXSYS_ceil(a) (float)ceil(a)
+#define FXSYS_floor(a) (float)floor(a)
+#define FXSYS_cos(a) (float)cos(a)
+#define FXSYS_acos(a) (float)acos(a)
+#define FXSYS_sin(a) (float)sin(a)
+#define FXSYS_log(a) (float)log(a)
+#define FXSYS_log10(a) (float)log10(a)
+#define FXSYS_fmod(a, b) (float)fmod(a, b)
#define FXSYS_abs abs
#define FXDWORD_GET_LSBFIRST(p) \
((static_cast<uint32_t>(p[3]) << 24) | (static_cast<uint32_t>(p[2]) << 16) | \
@@ -279,8 +278,8 @@ int32_t FXSYS_wtoi(const wchar_t* str);
int64_t FXSYS_atoi64(const char* str);
int64_t FXSYS_wtoi64(const wchar_t* str);
const char* FXSYS_i64toa(int64_t value, char* str, int radix);
-int FXSYS_round(FX_FLOAT f);
-#define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b))
+int FXSYS_round(float f);
+#define FXSYS_sqrt2(a, b) (float)FXSYS_sqrt((a) * (a) + (b) * (b))
#ifdef __cplusplus
};
#endif