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

Unified Diff: core/fpdfapi/parser/cpdf_object.h

Issue 2384883003: Remove CPDF_Object::Release() in favor of direct delete (Closed)
Patch Set: rebase 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_indirect_object_holder.cpp ('k') | core/fpdfapi/parser/cpdf_object.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_object.h
diff --git a/core/fpdfapi/parser/cpdf_object.h b/core/fpdfapi/parser/cpdf_object.h
index c888605d72a54265ae96ce2c2bce237cc2da124a..8f6491ec724531781e5cb97db64b5ed31abc05f1 100644
--- a/core/fpdfapi/parser/cpdf_object.h
+++ b/core/fpdfapi/parser/cpdf_object.h
@@ -38,6 +38,8 @@ class CPDF_Object {
REFERENCE
};
+ virtual ~CPDF_Object();
+
virtual Type GetType() const = 0;
uint32_t GetObjNum() const { return m_ObjNum; }
uint32_t GetGenNum() const { return m_GenNum; }
@@ -50,8 +52,6 @@ class CPDF_Object {
virtual CPDF_Object* CloneDirectObject() const;
virtual CPDF_Object* GetDirect() const;
- void Release();
-
virtual CFX_ByteString GetString() const;
virtual CFX_WideString GetUnicodeText() const;
virtual FX_FLOAT GetNumber() const;
@@ -94,10 +94,8 @@ class CPDF_Object {
friend class CPDF_Parser;
friend class CPDF_Reference;
friend class CPDF_Stream;
- friend struct std::default_delete<CPDF_Object>;
CPDF_Object() : m_ObjNum(0), m_GenNum(0) {}
- virtual ~CPDF_Object();
CPDF_Object* CloneObjectNonCyclic(bool bDirect) const;
@@ -118,6 +116,4 @@ class CPDF_Object {
CPDF_Object(const CPDF_Object& src) {}
};
-using UniqueObject = std::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>>;
-
#endif // CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_
« no previous file with comments | « core/fpdfapi/parser/cpdf_indirect_object_holder.cpp ('k') | core/fpdfapi/parser/cpdf_object.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698