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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_formobject.cpp

Issue 2119013002: Change class member variables in raw pointer type into unique_ptr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 5 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
« no previous file with comments | « core/fpdfapi/fpdf_font/ttgsubtable.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_formobject.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_formobject.cpp b/core/fpdfapi/fpdf_page/cpdf_formobject.cpp
index 567c156af0af3bac076518bd4c9dcfd4a2b7aa79..dc93ed3c54844be2634b63107fc6ab6ae93b7929 100644
--- a/core/fpdfapi/fpdf_page/cpdf_formobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_formobject.cpp
@@ -8,11 +8,9 @@
#include "core/fpdfapi/fpdf_page/include/cpdf_form.h"
-CPDF_FormObject::CPDF_FormObject() : m_pForm(nullptr) {}
+CPDF_FormObject::CPDF_FormObject() {}
-CPDF_FormObject::~CPDF_FormObject() {
- delete m_pForm;
-}
+CPDF_FormObject::~CPDF_FormObject() {}
void CPDF_FormObject::Transform(const CFX_Matrix& matrix) {
m_FormMatrix.Concat(matrix);
@@ -35,7 +33,7 @@ CPDF_FormObject* CPDF_FormObject::Clone() const {
CPDF_FormObject* obj = new CPDF_FormObject;
obj->CopyData(this);
- obj->m_pForm = m_pForm->Clone();
+ obj->m_pForm.reset(m_pForm->Clone());
obj->m_FormMatrix = m_FormMatrix;
return obj;
}
« no previous file with comments | « core/fpdfapi/fpdf_font/ttgsubtable.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698