OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FXCRT_INCLUDE_FX_EXT_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_EXT_H_ |
8 #define CORE_FXCRT_INCLUDE_FX_EXT_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_EXT_H_ |
9 | 9 |
10 #include <cctype> | 10 #include <cctype> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 inline int FXSYS_toDecimalDigit(const FX_CHAR c) { | 72 inline int FXSYS_toDecimalDigit(const FX_CHAR c) { |
73 return std::isdigit(c) ? c - '0' : 0; | 73 return std::isdigit(c) ? c - '0' : 0; |
74 } | 74 } |
75 | 75 |
76 inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { | 76 inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { |
77 return std::iswdigit(c) ? c - L'0' : 0; | 77 return std::iswdigit(c) ? c - L'0' : 0; |
78 } | 78 } |
79 | 79 |
80 uint32_t FX_HashCode_String_GetA(const FX_CHAR* pStr, | 80 uint32_t FX_HashCode_GetA(const CFX_ByteStringC& str, bool bIgnoreCase); |
81 int32_t iLength, | 81 uint32_t FX_HashCode_GetW(const CFX_WideStringC& Str, bool bIgnoreCase); |
82 FX_BOOL bIgnoreCase = FALSE); | |
83 uint32_t FX_HashCode_String_GetW(const FX_WCHAR* pStr, | |
84 int32_t iLength, | |
85 FX_BOOL bIgnoreCase = FALSE); | |
86 | 82 |
87 void* FX_Random_MT_Start(uint32_t dwSeed); | 83 void* FX_Random_MT_Start(uint32_t dwSeed); |
88 | 84 |
89 uint32_t FX_Random_MT_Generate(void* pContext); | 85 uint32_t FX_Random_MT_Generate(void* pContext); |
90 | 86 |
91 void FX_Random_MT_Close(void* pContext); | 87 void FX_Random_MT_Close(void* pContext); |
92 | 88 |
93 void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount); | 89 void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount); |
94 | 90 |
95 void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount); | 91 void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 j -= gap; | 123 j -= gap; |
128 } | 124 } |
129 pArray[j + gap] = v1; | 125 pArray[j + gap] = v1; |
130 } | 126 } |
131 gap >>= 1; | 127 gap >>= 1; |
132 } | 128 } |
133 } | 129 } |
134 }; | 130 }; |
135 | 131 |
136 #endif // CORE_FXCRT_INCLUDE_FX_EXT_H_ | 132 #endif // CORE_FXCRT_INCLUDE_FX_EXT_H_ |
OLD | NEW |