summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h3
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp8
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.h1
3 files changed, 4 insertions, 8 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h
index 45b8cb9f2e..08bb901ae6 100644
--- a/core/fpdfapi/parser/cpdf_parser.h
+++ b/core/fpdfapi/parser/cpdf_parser.h
@@ -198,11 +198,12 @@ class CPDF_Parser {
bool InitSyntaxParser(const RetainPtr<IFX_SeekableReadStream>& file_access);
bool ParseFileVersion();
- UnownedPtr<CPDF_Document> m_pDocument;
ObjectType GetObjectType(uint32_t objnum) const;
ObjectType GetObjectTypeFromCrossRefStreamType(
int cross_ref_stream_type) const;
+ UnownedPtr<CPDF_Document> m_pDocument;
+
bool m_bHasParsed;
bool m_bXRefStream;
int m_FileVersion;
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 66ce1838f2..624bde4ab3 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -41,13 +41,9 @@ enum class ReadStatus { Normal, Backslash, Octal, FinishOctal, CarriageReturn };
int CPDF_SyntaxParser::s_CurrentRecursionDepth = 0;
CPDF_SyntaxParser::CPDF_SyntaxParser()
- : CPDF_SyntaxParser(WeakPtr<ByteStringPool>()) {}
+ : m_pFileAccess(nullptr), m_pPool(WeakPtr<ByteStringPool>()) {}
-CPDF_SyntaxParser::CPDF_SyntaxParser(const WeakPtr<ByteStringPool>& pPool)
- : m_pFileAccess(nullptr), m_pPool(pPool) {}
-
-CPDF_SyntaxParser::~CPDF_SyntaxParser() {
-}
+CPDF_SyntaxParser::~CPDF_SyntaxParser() = default;
bool CPDF_SyntaxParser::GetCharAt(FX_FILESIZE pos, uint8_t& ch) {
AutoRestorer<FX_FILESIZE> save_pos(&m_Pos);
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h
index d3442880bc..50c20fc115 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.h
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.h
@@ -27,7 +27,6 @@ class CPDF_SyntaxParser {
enum class ParseType { kStrict, kLoose };
CPDF_SyntaxParser();
- explicit CPDF_SyntaxParser(const WeakPtr<ByteStringPool>& pPool);
~CPDF_SyntaxParser();
void InitParser(const RetainPtr<IFX_SeekableReadStream>& pFileAccess,