summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.h')
-rw-r--r--core/fpdfapi/parser/cpdf_array.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 8cfa0333bb..f473e26800 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -17,8 +17,8 @@
class CPDF_Array : public CPDF_Object {
public:
- using iterator = std::vector<CPDF_Object*>::iterator;
- using const_iterator = std::vector<CPDF_Object*>::const_iterator;
+ using iterator = std::vector<UniqueObject>::iterator;
+ using const_iterator = std::vector<UniqueObject>::const_iterator;
CPDF_Array();
@@ -67,8 +67,9 @@ class CPDF_Array : public CPDF_Object {
bool bDirect,
std::set<const CPDF_Object*>* pVisited) const override;
- std::vector<CPDF_Object*> m_Objects;
+ std::vector<UniqueObject> m_Objects;
};
+
using UniqueArray = std::unique_ptr<CPDF_Array, ReleaseDeleter<CPDF_Object>>;
inline CPDF_Array* ToArray(CPDF_Object* obj) {