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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1427913006: Remove _FPDF_ByteStringFromHex as it is unused (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 3057948959807b1e84e336729ad5ee6dc3efe3c2..e095414ffeb0e428dfd2a29207e5d3a9b6bff504 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1532,42 +1532,3 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, FX_BOOL bStroke) {
m_pCurStates->m_ClipPath.AppendPath(Path, PathClipType, TRUE);
}
}
-CFX_ByteString _FPDF_ByteStringFromHex(CFX_BinaryBuf& src_buf) {
- CFX_ByteTextBuf buf;
- FX_BOOL bFirst = TRUE;
- int code = 0;
- const uint8_t* str = src_buf.GetBuffer();
- FX_DWORD size = src_buf.GetSize();
- for (FX_DWORD i = 0; i < size; i++) {
- uint8_t ch = str[i];
- if (ch >= '0' && ch <= '9') {
- if (bFirst) {
- code = (ch - '0') * 16;
- } else {
- code += ch - '0';
- buf.AppendChar((char)code);
- }
- bFirst = !bFirst;
- } else if (ch >= 'A' && ch <= 'F') {
- if (bFirst) {
- code = (ch - 'A' + 10) * 16;
- } else {
- code += ch - 'A' + 10;
- buf.AppendChar((char)code);
- }
- bFirst = !bFirst;
- } else if (ch >= 'a' && ch <= 'f') {
- if (bFirst) {
- code = (ch - 'a' + 10) * 16;
- } else {
- code += ch - 'a' + 10;
- buf.AppendChar((char)code);
- }
- bFirst = !bFirst;
- }
- }
- if (!bFirst) {
- buf.AppendChar((char)code);
- }
- return buf.GetByteString();
-}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698