summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-10 01:15:46 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-10 17:08:14 +0000
commit58577fd17020f52314bba8989be964a8c2fd010d (patch)
treeebd92fbd721dbdc783b1ab7f166a2ddcc14d49fc /core/fxcrt
parent6e10d000ce048e67d36358c768c8cdad747eec15 (diff)
downloadpdfium-58577fd17020f52314bba8989be964a8c2fd010d.tar.xz
Use FXSYS_IntToTwoHexChars() in more places.
Change-Id: I84cd8e91a296119ecf80b7a092b886f291bebb45 Reviewed-on: https://pdfium-review.googlesource.com/4953 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_extension.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
index 2b290ed79d..10b568ec9e 100644
--- a/core/fxcrt/fx_extension.cpp
+++ b/core/fxcrt/fx_extension.cpp
@@ -251,8 +251,6 @@ void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount) {
}
#ifdef PDF_ENABLE_XFA
-static const char gs_FX_pHexChars[] = "0123456789ABCDEF";
-
void FX_GUID_CreateV4(FX_GUID* pGUID) {
FX_Random_GenerateMT((uint32_t*)pGUID, 4);
uint8_t& b = ((uint8_t*)pGUID)[6];
@@ -264,8 +262,8 @@ CFX_ByteString FX_GUID_ToString(const FX_GUID* pGUID, bool bSeparator) {
char* pBuf = bsStr.GetBuffer(40);
for (int32_t i = 0; i < 16; i++) {
uint8_t b = reinterpret_cast<const uint8_t*>(pGUID)[i];
- *pBuf++ = gs_FX_pHexChars[b >> 4];
- *pBuf++ = gs_FX_pHexChars[b & 0x0F];
+ FXSYS_IntToTwoHexChars(b, pBuf);
+ pBuf += 2;
if (bSeparator && (i == 3 || i == 5 || i == 7 || i == 9))
*pBuf++ = L'-';
}