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

Side by Side Diff: core/fxcrt/include/fx_ext.h

Issue 1919563002: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix issue from c4 Created 4 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « core/fxcrt/fx_extension_unittest.cpp ('k') | fpdfsdk/javascript/global.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « core/fxcrt/fx_extension_unittest.cpp ('k') | fpdfsdk/javascript/global.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698