summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_extension.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-11-16 12:28:39 -0500
committerDan Sinclair <dsinclair@chromium.org>2015-11-16 12:28:39 -0500
commit3f148915d12f54a946a0c0bf526162b79c39d650 (patch)
tree17a95f27c8a6a07356b68ac41b5fbcc0f2358ab9 /core/src/fxcrt/fx_extension.cpp
parent76c6d639f46c37ba955569f507201eb3f1b613fc (diff)
downloadpdfium-3f148915d12f54a946a0c0bf526162b79c39d650.tar.xz
Reland "Cleanup some numeric code.""chromium/2567
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 .
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r--core/src/fxcrt/fx_extension.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 7eb86d6364..37437ae9ed 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -51,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);
}
@@ -190,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;
@@ -298,6 +291,3 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount) {
FX_Random_GenerateBase(pBuffer, iCount);
#endif
}
-#ifdef __cplusplus
-}
-#endif