Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2561)

Unified Diff: core/fpdfapi/fpdf_edit/include/cpdf_creator.h

Issue 1976003003: Clean up CPDF_Creator. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_edit/include/cpdf_creator.h
diff --git a/core/fpdfapi/fpdf_edit/include/cpdf_creator.h b/core/fpdfapi/fpdf_edit/include/cpdf_creator.h
index 536d13fbc53c38f6339a94d82651ad92ccbd339e..3c207cb4e37ad25f64b9b069d7b4ada8448a0547 100644
--- a/core/fpdfapi/fpdf_edit/include/cpdf_creator.h
+++ b/core/fpdfapi/fpdf_edit/include/cpdf_creator.h
@@ -7,6 +7,8 @@
#ifndef CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_
#define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_basic.h"
class CPDF_Array;
@@ -26,7 +28,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj);
class CPDF_Creator {
public:
- CPDF_Creator(CPDF_Document* pDoc);
+ explicit CPDF_Creator(CPDF_Document* pDoc);
~CPDF_Creator();
void RemoveSecurity();
@@ -71,18 +73,18 @@ class CPDF_Creator {
uint32_t objnum,
CPDF_CryptoHandler* pCrypto);
- CPDF_Document* m_pDocument;
- CPDF_Parser* m_pParser;
+ CPDF_Document* const m_pDocument;
+ CPDF_Parser* const m_pParser;
FX_BOOL m_bCompress;
FX_BOOL m_bSecurityChanged;
CPDF_Dictionary* m_pEncryptDict;
- uint32_t m_dwEnryptObjNum;
+ uint32_t m_dwEncryptObjNum;
FX_BOOL m_bEncryptCloned;
CPDF_CryptoHandler* m_pCryptoHandler;
FX_BOOL m_bLocalCryptoHandler;
FX_BOOL m_bEncryptMetadata;
CPDF_Object* m_pMetadata;
- CPDF_XRefStream* m_pXRefStream;
+ std::unique_ptr<CPDF_XRefStream> m_pXRefStream;
int32_t m_ObjectStreamSize;
uint32_t m_dwLastObjNum;
CFX_FileBufferArchive m_File;
« core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('K') | « core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698