diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-06-08 20:35:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-08 20:35:04 +0000 |
commit | 84a331e041ff22718945e467bce15c177842e139 (patch) | |
tree | d9a4a0b83e47f1ff6de7361bb6a10417785b505a | |
parent | 4b292f776c05f7abeeaaa4f2cde51a71212747bf (diff) | |
download | pdfium-84a331e041ff22718945e467bce15c177842e139.tar.xz |
Move member initializations to cpdf_creator.h
Change-Id: If19338b63b09ca79aa07c6fbb8eb7e42a689360e
Reviewed-on: https://pdfium-review.googlesource.com/34730
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r-- | core/fpdfapi/edit/cpdf_creator.cpp | 9 | ||||
-rw-r--r-- | 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<IFX_WriteStream>& 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<CFX_FileBufferArchive>(archive)), - m_SavedOffset(0), - m_iStage(-1), - m_CurObjNum(0), - m_XrefStart(0), - m_pIDArray(nullptr), - m_FileVersion(0) {} + m_Archive(pdfium::MakeUnique<CFX_FileBufferArchive>(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<CPDF_Document> const m_pDocument; UnownedPtr<CPDF_Parser> const m_pParser; - bool m_bSecurityChanged; UnownedPtr<CPDF_Dictionary> m_pEncryptDict; fxcrt::MaybeOwned<CPDF_SecurityHandler> m_pSecurityHandler; UnownedPtr<const CPDF_Object> m_pMetadata; uint32_t m_dwLastObjNum; std::unique_ptr<IFX_ArchiveStream> 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<uint32_t, FX_FILESIZE> m_ObjectOffsets; std::vector<uint32_t> m_NewObjNumArray; // Sorted, ascending. std::unique_ptr<CPDF_Array> m_pIDArray; - int32_t m_FileVersion; + int32_t m_FileVersion = 0; + bool m_bSecurityChanged = false; bool m_IsIncremental = false; bool m_IsOriginal = false; }; |