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

Unified Diff: core/fpdfapi/parser/cpdf_null.cpp

Issue 2484033002: Return unique_ptr from CPDF_Object::Clone(). (Closed)
Patch Set: Be painfully obvious about hidden expression Created 4 years, 1 month 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/parser/cpdf_null.cpp
diff --git a/core/fpdfapi/parser/cpdf_null.cpp b/core/fpdfapi/parser/cpdf_null.cpp
index dd23101aa898e248c4a2213d064861e460e0997f..41478d7b4c00cbf225893eed6694edf68589622f 100644
--- a/core/fpdfapi/parser/cpdf_null.cpp
+++ b/core/fpdfapi/parser/cpdf_null.cpp
@@ -5,6 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fpdfapi/parser/cpdf_null.h"
+#include "third_party/base/ptr_util.h"
CPDF_Null::CPDF_Null() {}
@@ -12,6 +13,6 @@ CPDF_Object::Type CPDF_Null::GetType() const {
return NULLOBJ;
}
-CPDF_Object* CPDF_Null::Clone() const {
- return new CPDF_Null;
+std::unique_ptr<CPDF_Object> CPDF_Null::Clone() const {
+ return pdfium::MakeUnique<CPDF_Null>();
}

Powered by Google App Engine
This is Rietveld 408576698