From b6db95b0d55869168ee13e2b8accb0d16dc7ad8b Mon Sep 17 00:00:00 2001 From: Artem Strygin Date: Wed, 9 Aug 2017 23:11:16 +0300 Subject: Remove useless code. The CPDF_Parser::IsVersionUpdated is not used anymore. Change-Id: I896c42daca3c5bed7b9d700eaea6ced686ab5acb Reviewed-on: https://pdfium-review.googlesource.com/10490 Commit-Queue: Art Snake Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fpdfapi/parser/cpdf_parser.cpp | 6 ------ core/fpdfapi/parser/cpdf_parser.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index d35f034e97..bf711bd972 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -71,7 +71,6 @@ CPDF_Parser::CPDF_Parser() : m_pSyntax(pdfium::MakeUnique()), m_bHasParsed(false), m_bXRefStream(false), - m_bVersionUpdated(false), m_FileVersion(0), m_pEncryptDict(nullptr), m_TrailerPos(CPDF_Parser::kInvalidPos), @@ -594,8 +593,6 @@ void CPDF_Parser::MergeCrossRefObjectsData( for (const auto& obj : objects) { m_ObjectInfo[obj.obj_num] = obj.info; if (obj.info.type != ObjectType::kFree) { - if (obj.info.gennum > 0) - m_bVersionUpdated = true; if (obj.info.type == ObjectType::kNotCompressed && obj.info.pos < m_pSyntax->m_FileLen) { m_SortedOffset.insert(obj.info.pos); @@ -814,11 +811,8 @@ bool CPDF_Parser::RebuildCrossRef() { if (!m_ObjectInfo.empty() && IsValidObjectNumber(objnum) && m_ObjectInfo[objnum].pos) { if (pObject) { - uint32_t oldgen = GetObjectGenNum(objnum); m_ObjectInfo[objnum].pos = obj_pos; m_ObjectInfo[objnum].gennum = gennum; - if (oldgen != gennum) - m_bVersionUpdated = true; } } else { m_ObjectInfo[objnum].pos = obj_pos; diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index 594171be46..0f28771344 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -83,7 +83,6 @@ class CPDF_Parser { FX_FILESIZE GetObjectPositionOrZero(uint32_t objnum) const; ObjectType GetObjectType(uint32_t objnum) const; uint16_t GetObjectGenNum(uint32_t objnum) const; - bool IsVersionUpdated() const { return m_bVersionUpdated; } bool IsObjectFreeOrNull(uint32_t objnum) const; CFX_RetainPtr GetCryptoHandler() const; CFX_RetainPtr GetFileAccess() const; @@ -196,7 +195,6 @@ class CPDF_Parser { CFX_UnownedPtr m_pDocument; bool m_bHasParsed; bool m_bXRefStream; - bool m_bVersionUpdated; int m_FileVersion; CFX_UnownedPtr m_pEncryptDict; FX_FILESIZE m_LastXRefOffset; -- cgit v1.2.3