diff options
author | dan sinclair <dsinclair@chromium.org> | 2015-11-10 13:33:04 -0500 |
---|---|---|
committer | dan sinclair <dsinclair@chromium.org> | 2015-11-10 13:33:04 -0500 |
commit | 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1 (patch) | |
tree | d0f6ba295574785c773536be7b5526680ed60f04 /core/src/fxcrt/fx_extension.cpp | |
parent | e6e16954f0cdc324849fca9da883be8f131b3834 (diff) | |
download | pdfium-0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1.tar.xz |
Revert x4 "Cleanup some numeric code."
This reverts commit b27902b8995bb3e003daed6b0811ed746763c68d.
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.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1432973003 .
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r-- | core/src/fxcrt/fx_extension.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp index 37437ae9ed..7eb86d6364 100644 --- a/core/src/fxcrt/fx_extension.cpp +++ b/core/src/fxcrt/fx_extension.cpp @@ -51,7 +51,9 @@ IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer, IFX_MemoryStream* FX_CreateMemoryStream(FX_BOOL bConsecutive) { return new CFX_MemoryStream(bConsecutive); } - +#ifdef __cplusplus +extern "C" { +#endif FX_FLOAT FXSYS_tan(FX_FLOAT a) { return (FX_FLOAT)tan(a); } @@ -188,7 +190,12 @@ FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, } return dwHashCode; } - +#ifdef __cplusplus +} +#endif +#ifdef __cplusplus +extern "C" { +#endif void* FX_Random_MT_Start(FX_DWORD dwSeed) { FX_LPMTRANDOMCONTEXT pContext = FX_Alloc(FX_MTRANDOMCONTEXT, 1); pContext->mt[0] = dwSeed; @@ -291,3 +298,6 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount) { FX_Random_GenerateBase(pBuffer, iCount); #endif } +#ifdef __cplusplus +} +#endif |