From e65be3a55628294d0f45da456d856b4539f0cb15 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 2 Nov 2015 14:20:08 -0500 Subject: Remove _FPDF_ByteStringFromHex as it is unused There are no uses of this method, I also checked the XFA branch and there don't appear to be any uses there either. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1427913006 . --- core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 39 ------------------------- 1 file changed, 39 deletions(-) (limited to 'core/src/fpdfapi/fpdf_page') diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp index 3057948959..e095414ffe 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(); -} -- cgit v1.2.3