From 589f7e0a57675efce9810c15a3e9b7c49bf0bc90 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 29 Oct 2015 14:56:26 -0400 Subject: Cleanup some numeric code. This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1415933005 . --- core/include/fxcrt/fx_ext.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'core/include') diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h index c24955fb7c..a31d10040a 100644 --- a/core/include/fxcrt/fx_ext.h +++ b/core/include/fxcrt/fx_ext.h @@ -13,6 +13,8 @@ extern "C" { #endif +int HexCharToDigit(char c); + FX_FLOAT FXSYS_tan(FX_FLOAT a); FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, @@ -45,13 +47,6 @@ FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endif - void* FX_Random_MT_Start(FX_DWORD dwSeed); FX_DWORD FX_Random_MT_Generate(void* pContext); @@ -66,6 +61,7 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount); #ifdef __cplusplus } #endif + template class CFX_SSortTemplate { public: -- cgit v1.2.3