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

Unified Diff: core/src/fxcrt/fx_basic_util.cpp

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fx_basic_utf.cpp ('k') | core/src/fxcrt/fx_basic_wstring.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_basic_util.cpp
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index be736f1b2137df43977434313b00b3d624e3a05a..615b29742127168beaf8a62d376987cddb86ddc5 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -187,22 +187,22 @@ void FXSYS_vsnprintf(char *str, size_t size, const char* fmt, va_list ap)
}
#endif // _FXM_PLATFORM_WINDOWS_ && _MSC_VER < 1900
-static FX_BOOL FX_IsDigit(FX_BYTE ch)
+static FX_BOOL FX_IsDigit(uint8_t ch)
{
return (ch >= '0' && ch <= '9') ? TRUE : FALSE;
}
-static FX_BOOL FX_IsXDigit(FX_BYTE ch)
+static FX_BOOL FX_IsXDigit(uint8_t ch)
{
return (FX_IsDigit(ch) || (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')) ? TRUE : FALSE;
}
-static FX_BYTE FX_MakeUpper(FX_BYTE ch)
+static uint8_t FX_MakeUpper(uint8_t ch)
{
if (ch < 'a' || ch > 'z') {
return ch;
}
return ch - 32;
}
-static int FX_HexToI(FX_BYTE ch)
+static int FX_HexToI(uint8_t ch)
{
ch = FX_MakeUpper(ch);
return FX_IsDigit(ch) ? (ch - '0') : (ch - 55);
@@ -237,7 +237,7 @@ CFX_ByteString FX_UrlEncode(const CFX_WideString& wsUrl)
int nByte = bsUri.GetLength();
for (int j = 0; j < nByte; j++) {
rUrl += '%';
- FX_BYTE code = bsUri.GetAt(j);
+ uint8_t code = bsUri.GetAt(j);
rUrl += arDigits[code >> 4];
rUrl += arDigits[code & 0x0F];
}
@@ -268,7 +268,7 @@ CFX_ByteString FX_EncodeURI(const CFX_WideString& wsURI)
CFX_ByteString bsUri = wsURI.UTF8Encode();
int nLength = bsUri.GetLength();
for (int i = 0; i < nLength; i++) {
- FX_BYTE code = bsUri.GetAt(i);
+ uint8_t code = bsUri.GetAt(i);
if (code > 0x7F || url_encodeTable[code] == 1) {
rURI += '%';
rURI += arDigits[code >> 4];
« no previous file with comments | « core/src/fxcrt/fx_basic_utf.cpp ('k') | core/src/fxcrt/fx_basic_wstring.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698