diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-11-03 14:54:35 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-11-03 14:54:35 -0500 |
commit | e0e922db5fb77df9a5a9cc802096f484ed21da1c (patch) | |
tree | d6b3da42c1a28ec150c5cb9fe6b00d8f6af099d5 /core/src/fxcrt/fx_extension.cpp | |
parent | c9e76c09b9e7901823ac52a3705da235bd2abe24 (diff) | |
download | pdfium-e0e922db5fb77df9a5a9cc802096f484ed21da1c.tar.xz |
Revert "Revert "Cleanup some numeric code.""
This reverts commit 23d576f0b498bd4f37ef2175916223a2e5ea0324.
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=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1405253007 .
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r-- | core/src/fxcrt/fx_extension.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp index d64a06d08b..4951fbde9c 100644 --- a/core/src/fxcrt/fx_extension.cpp +++ b/core/src/fxcrt/fx_extension.cpp @@ -7,6 +7,7 @@ #include "../../include/fxcrt/fx_basic.h" #include "../../include/fxcrt/fx_ext.h" #include "extension.h" + #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ #include <wincrypt.h> #else @@ -50,9 +51,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); } @@ -189,12 +188,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; @@ -297,6 +291,4 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount) { FX_Random_GenerateBase(pBuffer, iCount); #endif } -#ifdef __cplusplus -} -#endif + |