factor out hexadecimal constants.
Now we don't have to rely on the linker to de-duplicate
so many gHex[] constants.
Change-Id: Ia86d3a92648415afdb8d29499b4faded5ed05c7d
Reviewed-on: https://skia-review.googlesource.com/20180
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index 2487043..3cbf038 100644
--- a/src/pdf/SkPDFUtils.cpp
+++ b/src/pdf/SkPDFUtils.cpp
@@ -479,10 +479,8 @@
wStream->writeText("<");
for (size_t i = 0; i < len; i++) {
uint8_t c = static_cast<uint8_t>(cin[i]);
- static const char gHex[] = "0123456789ABCDEF";
- char hexValue[2];
- hexValue[0] = gHex[(c >> 4) & 0xF];
- hexValue[1] = gHex[ c & 0xF];
+ char hexValue[2] = { SkHexadecimalDigits::gUpper[c >> 4],
+ SkHexadecimalDigits::gUpper[c & 0xF] };
wStream->write(hexValue, 2);
}
wStream->writeText(">");