diff options
author | tsepez <tsepez@chromium.org> | 2016-10-31 14:59:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-31 14:59:31 -0700 |
commit | 5a22582ca1dbe1d66b18d5253bfa1d202fcc3b4a (patch) | |
tree | afefbba7723960401ad83da279ec1eab8e12f20f | |
parent | da3447b5a8c1baffacf485461b0169f778706305 (diff) | |
download | pdfium-5a22582ca1dbe1d66b18d5253bfa1d202fcc3b4a.tar.xz |
Re-land "Change FX_BOOL definition from int to bool."chromium/2906
This reverts commit 747dcf7
Review-Url: https://codereview.chromium.org/2468723002
-rw-r--r-- | core/fxcrt/fx_system.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h index 8364db3a4e..bcddf1aeeb 100644 --- a/core/fxcrt/fx_system.h +++ b/core/fxcrt/fx_system.h @@ -65,11 +65,18 @@ #ifdef __cplusplus extern "C" { +typedef bool FX_BOOL; // Deprecated. +#ifndef TRUE +#define TRUE true +#endif +#ifndef FALSE +#define FALSE false #endif +#endif // __cplusplus + typedef void* FX_POSITION; // Keep until fxcrt containers gone typedef float FX_FLOAT; // Keep, allow upgrade to doubles. typedef double FX_DOUBLE; // Keep, allow downgrade to floats. -typedef int FX_BOOL; // Keep, sadly not always 0 or 1. typedef char FX_CHAR; // Keep, questionable signedness. typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. @@ -83,14 +90,6 @@ typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. // TODO(palmer): it should be a |size_t|, or at least unsigned. typedef int FX_STRSIZE; -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - #ifdef __cplusplus static_assert(TRUE == true, "true_needs_to_be_true"); static_assert(FALSE == false, "false_needs_to_be_false"); |