diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-01-25 15:09:03 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-01-25 15:09:03 -0800 |
commit | e24ea22700c9fc534d40cc510d59c453aa9d0ddb (patch) | |
tree | e2a687429137ca0399da6692dc206b076ca6335a /core/src/fpdfapi | |
parent | 0f68785be6af2b15109bb8a8f3bb7ebc040500d5 (diff) | |
download | pdfium-e24ea22700c9fc534d40cc510d59c453aa9d0ddb.tar.xz |
Remove several more unused parser values.
unused progressive enum
unused members m_bFileStream, m_dwWordPos
Remove PDFWORD_* types
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1634683003 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 3 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp | 13 |
2 files changed, 2 insertions, 14 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index 6cf8b7841e..9f6665d025 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -1707,8 +1707,6 @@ CPDF_SyntaxParser::CPDF_SyntaxParser() { m_BufSize = CPDF_ModuleMgr::kFileBufSize; m_pFileBuf = NULL; m_MetadataObjnum = 0; - m_dwWordPos = 0; - m_bFileStream = FALSE; } CPDF_SyntaxParser::~CPDF_SyntaxParser() { @@ -2001,7 +1999,6 @@ void CPDF_SyntaxParser::ToNextWord() { while (1) { while (PDFCharIsWhitespace(ch)) { - m_dwWordPos = m_Pos; if (!GetNextChar(ch)) return; } diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp index 1abf665d65..b3172dd848 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp @@ -70,12 +70,9 @@ CPDF_SimpleParser::CPDF_SimpleParser(const CFX_ByteStringC& str) { m_dwSize = str.GetLength(); m_dwCurPos = 0; } -void CPDF_SimpleParser::ParseWord(const uint8_t*& pStart, - FX_DWORD& dwSize, - int& type) { +void CPDF_SimpleParser::ParseWord(const uint8_t*& pStart, FX_DWORD& dwSize) { pStart = NULL; dwSize = 0; - type = PDFWORD_EOF; uint8_t ch; while (1) { if (m_dwSize <= m_dwCurPos) @@ -110,12 +107,10 @@ void CPDF_SimpleParser::ParseWord(const uint8_t*& pStart, if (!PDFCharIsOther(ch) && !PDFCharIsNumeric(ch)) { m_dwCurPos--; dwSize = m_dwCurPos - start_pos; - type = PDFWORD_NAME; return; } } } else { - type = PDFWORD_DELIMITER; dwSize = 1; if (ch == '<') { if (m_dwSize <= m_dwCurPos) @@ -138,11 +133,8 @@ void CPDF_SimpleParser::ParseWord(const uint8_t*& pStart, return; } - type = PDFWORD_NUMBER; dwSize = 1; while (1) { - if (!PDFCharIsNumeric(ch)) - type = PDFWORD_TEXT; if (m_dwSize <= m_dwCurPos) return; ch = m_pData[m_dwCurPos++]; @@ -157,8 +149,7 @@ void CPDF_SimpleParser::ParseWord(const uint8_t*& pStart, CFX_ByteStringC CPDF_SimpleParser::GetWord() { const uint8_t* pStart; FX_DWORD dwSize; - int type; - ParseWord(pStart, dwSize, type); + ParseWord(pStart, dwSize); if (dwSize == 1 && pStart[0] == '<') { while (m_dwCurPos < m_dwSize && m_pData[m_dwCurPos] != '>') { m_dwCurPos++; |