diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-11-16 13:09:00 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-11-16 13:09:00 -0500 |
commit | 10cfea1fdafc8fcf1edd60bc783e9db9ef6229c0 (patch) | |
tree | 3cd1bc8e6a6b33391ea8ad83388a07ca4974f40b /core/src/fxcrt/fx_extension.cpp | |
parent | ec441e67745054ece5e3d736b60fffa2f7f8d20c (diff) | |
download | pdfium-10cfea1fdafc8fcf1edd60bc783e9db9ef6229c0.tar.xz |
Merge to XFA: Reland "Cleanup some numeric code.""
This reverts commit 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1.
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=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1449873003 .
(cherry picked from commit 3f148915d12f54a946a0c0bf526162b79c39d650)
Review URL: https://codereview.chromium.org/1452673002 .
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r-- | core/src/fxcrt/fx_extension.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp index dd80b2284a..3761192a8d 100644 --- a/core/src/fxcrt/fx_extension.cpp +++ b/core/src/fxcrt/fx_extension.cpp @@ -63,9 +63,7 @@ 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); } @@ -202,12 +200,7 @@ 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; @@ -310,12 +303,7 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount) { FX_Random_GenerateBase(pBuffer, iCount); #endif } -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endif + void FX_GUID_CreateV4(FX_LPGUID pGUID) { #if (_FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \ _FX_OS_ == _FX_WIN64_) @@ -348,6 +336,3 @@ void FX_GUID_ToString(FX_LPCGUID pGUID, } bsStr.ReleaseBuffer(bSeparator ? 36 : 32); } -#ifdef __cplusplus -} -#endif |