From 1d023881cd53485303c0fcc0b5878e700dc470fd Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 13 Oct 2016 16:36:20 -0700 Subject: Make CPDF_Object containers hold objects via unique pointers. This tweaks the implementation while leaving the API the same. The API change is more disruptive, so break this part off first. Review-Url: https://codereview.chromium.org/2385293002 --- core/fpdfapi/parser/cpdf_array.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/parser/cpdf_array.h') 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::iterator; - using const_iterator = std::vector::const_iterator; + using iterator = std::vector::iterator; + using const_iterator = std::vector::const_iterator; CPDF_Array(); @@ -67,8 +67,9 @@ class CPDF_Array : public CPDF_Object { bool bDirect, std::set* pVisited) const override; - std::vector m_Objects; + std::vector m_Objects; }; + using UniqueArray = std::unique_ptr>; inline CPDF_Array* ToArray(CPDF_Object* obj) { -- cgit v1.2.3