Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1911)

Unified Diff: core/include/fxcrt/fx_ext.h

Issue 1431683008: Revert "Revert "Revert "Cleanup some numeric code.""" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_ext.h
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index 4cea13c9fdf8b4e0f7a76eba18f178315decc3f9..c24955fb7cb0de19b294a822a85c4671d9995bfc 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -7,10 +7,12 @@
#ifndef CORE_INCLUDE_FXCRT_FX_EXT_H_
#define CORE_INCLUDE_FXCRT_FX_EXT_H_
-#include <cctype>
-
#include "fx_system.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
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,
@@ -36,19 +38,6 @@ inline int32_t FXSYS_toupper(int32_t ch) {
return ch < 'a' || ch > 'z' ? ch : (ch - 0x20);
}
-inline int FXSYS_toHexDigit(char c) {
- if (!std::isxdigit(c))
- return 0;
- char upchar = std::toupper(c);
- return upchar > '9' ? upchar - 'A' + 10 : upchar - '0';
-}
-
-inline int FXSYS_toDecimalDigit(char c) {
- if (!std::isdigit(c))
- return 0;
- return c - '0';
-}
-
FX_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr,
int32_t iLength,
FX_BOOL bIgnoreCase = FALSE);
@@ -56,6 +45,13 @@ 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);
@@ -67,7 +63,9 @@ void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount);
void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount);
void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount);
-
+#ifdef __cplusplus
+}
+#endif
template <class baseType>
class CFX_SSortTemplate {
public:
« no previous file with comments | « BUILD.gn ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698