From ff46aaf499edcf153ee2f57c7016587aa96dcfa0 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 27 Jul 2015 11:55:29 -0700 Subject: FX Bool considered harmful, part 3 Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 . --- core/include/fxcrt/fx_ext.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/include/fxcrt/fx_ext.h') diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h index f24f4549a3..a04fc529be 100644 --- a/core/include/fxcrt/fx_ext.h +++ b/core/include/fxcrt/fx_ext.h @@ -21,11 +21,11 @@ FX_WCHAR* FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr, size_t count) int32_t FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count); int32_t FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t count); -inline FX_BOOL FXSYS_islower(int32_t ch) +inline bool FXSYS_islower(int32_t ch) { return ch >= 'a' && ch <= 'z'; } -inline FX_BOOL FXSYS_isupper(int32_t ch) +inline bool FXSYS_isupper(int32_t ch) { return ch >= 'A' && ch <= 'Z'; } @@ -38,8 +38,8 @@ inline int32_t FXSYS_toupper(int32_t ch) return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); } -FX_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE); -FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE); +FX_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, bool bIgnoreCase = false); +FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, bool bIgnoreCase = false); #ifdef __cplusplus } -- cgit v1.2.3