diff options
author | tsepez <tsepez@chromium.org> | 2016-11-18 16:22:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-18 16:22:41 -0800 |
commit | 0e606b5ecd6e45f74391f110cc1fe0cce0e80c64 (patch) | |
tree | 07c55fac710b191cf5d1d6595c63b90ca52e3cbb /core/fpdfapi/page/cpdf_allstates.cpp | |
parent | 430ab8363e77c48b2c2435af4d289f85e2be1b96 (diff) | |
download | pdfium-0e606b5ecd6e45f74391f110cc1fe0cce0e80c64.tar.xz |
Make CPDF_Dictionary use unique pointers.chromium/2926
Some changes were required to match underlying ctors
as invoked by the templated methods.
Many release() calls go away, a few WrapUniques() are
introduced to avoid going deeper into other code.
Review-Url: https://codereview.chromium.org/2510223002
Diffstat (limited to 'core/fpdfapi/page/cpdf_allstates.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_allstates.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_allstates.cpp b/core/fpdfapi/page/cpdf_allstates.cpp index 012c1349c0..f88342d7d7 100644 --- a/core/fpdfapi/page/cpdf_allstates.cpp +++ b/core/fpdfapi/page/cpdf_allstates.cpp @@ -6,6 +6,8 @@ #include "core/fpdfapi/page/cpdf_allstates.h" +#include <algorithm> + #include "core/fpdfapi/page/pageint.h" #include "core/fpdfapi/parser/cpdf_array.h" #include "core/fpdfapi/parser/cpdf_dictionary.h" @@ -52,7 +54,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, CPDF_StreamContentParser* pParser) { for (const auto& it : *pGS) { const CFX_ByteString& key_str = it.first; - CPDF_Object* pElement = it.second; + CPDF_Object* pElement = it.second.get(); CPDF_Object* pObject = pElement ? pElement->GetDirect() : nullptr; if (!pObject) continue; |