From 84a331e041ff22718945e467bce15c177842e139 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Fri, 8 Jun 2018 20:35:04 +0000 Subject: Move member initializations to cpdf_creator.h Change-Id: If19338b63b09ca79aa07c6fbb8eb7e42a689360e Reviewed-on: https://pdfium-review.googlesource.com/34730 Commit-Queue: Henrique Nakashima Reviewed-by: Lei Zhang --- core/fpdfapi/edit/cpdf_creator.cpp | 9 +-------- core/fpdfapi/edit/cpdf_creator.h | 12 ++++++------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp index dc2049451a..60872c2059 100644 --- a/core/fpdfapi/edit/cpdf_creator.cpp +++ b/core/fpdfapi/edit/cpdf_creator.cpp @@ -144,17 +144,10 @@ CPDF_Creator::CPDF_Creator(CPDF_Document* pDoc, const RetainPtr& archive) : m_pDocument(pDoc), m_pParser(pDoc->GetParser()), - m_bSecurityChanged(false), m_pEncryptDict(m_pParser ? m_pParser->GetEncryptDict() : nullptr), m_pSecurityHandler(m_pParser ? m_pParser->GetSecurityHandler() : nullptr), m_dwLastObjNum(m_pDocument->GetLastObjNum()), - m_Archive(pdfium::MakeUnique(archive)), - m_SavedOffset(0), - m_iStage(-1), - m_CurObjNum(0), - m_XrefStart(0), - m_pIDArray(nullptr), - m_FileVersion(0) {} + m_Archive(pdfium::MakeUnique(archive)) {} CPDF_Creator::~CPDF_Creator() {} diff --git a/core/fpdfapi/edit/cpdf_creator.h b/core/fpdfapi/edit/cpdf_creator.h index b9c8aa8a80..af1a486d44 100644 --- a/core/fpdfapi/edit/cpdf_creator.h +++ b/core/fpdfapi/edit/cpdf_creator.h @@ -63,20 +63,20 @@ class CPDF_Creator { UnownedPtr const m_pDocument; UnownedPtr const m_pParser; - bool m_bSecurityChanged; UnownedPtr m_pEncryptDict; fxcrt::MaybeOwned m_pSecurityHandler; UnownedPtr m_pMetadata; uint32_t m_dwLastObjNum; std::unique_ptr m_Archive; - FX_FILESIZE m_SavedOffset; - int32_t m_iStage; - uint32_t m_CurObjNum; - FX_FILESIZE m_XrefStart; + FX_FILESIZE m_SavedOffset = 0; + int32_t m_iStage = -1; + uint32_t m_CurObjNum = 0; + FX_FILESIZE m_XrefStart = 0; std::map m_ObjectOffsets; std::vector m_NewObjNumArray; // Sorted, ascending. std::unique_ptr m_pIDArray; - int32_t m_FileVersion; + int32_t m_FileVersion = 0; + bool m_bSecurityChanged = false; bool m_IsIncremental = false; bool m_IsOriginal = false; }; -- cgit v1.2.3