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

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

Issue 2484033002: Return unique_ptr from CPDF_Object::Clone(). (Closed)
Patch Set: std::move() it 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
« no previous file with comments | « core/fpdfapi/parser/cpdf_boolean.h ('k') | core/fpdfapi/parser/cpdf_dictionary.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_boolean.cpp
diff --git a/core/fpdfapi/parser/cpdf_boolean.cpp b/core/fpdfapi/parser/cpdf_boolean.cpp
index 416b6ff4bcafb7ecc61228f04b564bbdb3d67c2f..0204fd9eb0c4659dc7f4bb4cd3adada11fbe70b8 100644
--- a/core/fpdfapi/parser/cpdf_boolean.cpp
+++ b/core/fpdfapi/parser/cpdf_boolean.cpp
@@ -5,6 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fpdfapi/parser/cpdf_boolean.h"
+#include "third_party/base/ptr_util.h"
CPDF_Boolean::CPDF_Boolean() : m_bValue(false) {}
@@ -16,8 +17,8 @@ CPDF_Object::Type CPDF_Boolean::GetType() const {
return BOOLEAN;
}
-CPDF_Object* CPDF_Boolean::Clone() const {
- return new CPDF_Boolean(m_bValue);
+std::unique_ptr<CPDF_Object> CPDF_Boolean::Clone() const {
+ return pdfium::MakeUnique<CPDF_Boolean>(m_bValue);
}
CFX_ByteString CPDF_Boolean::GetString() const {
« no previous file with comments | « core/fpdfapi/parser/cpdf_boolean.h ('k') | core/fpdfapi/parser/cpdf_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698