diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:26:21 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:26:21 -0800 |
commit | 035359cd8ddb555fa33b6133db4fd405e4660712 (patch) | |
tree | 89accecac7da250468166168cd502ed7b92c7ce7 /core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | |
parent | 0c92bed7ade20fe193dce0a481dad48e1be41622 (diff) | |
download | pdfium-035359cd8ddb555fa33b6133db4fd405e4660712.tar.xz |
Get rid of most uses of CFX_PtrArray.
I didn't go whole hog and replace these with std::vector,
but in the mean time, it is silly to cast a typedef for
a template instantiated against void* when we can just
instantiate the template against the actual type.
The ones that remain are actual heterogeneous arrays with
wacky casting.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1518593002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index 57d1971889..dbd5f311a6 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -335,7 +335,7 @@ FX_BOOL PDF_DataDecode(const uint8_t* src_buf, CPDF_Object* pParams = pDict ? pDict->GetElementValue(FX_BSTRC("DecodeParms")) : nullptr; CFX_ByteStringArray DecoderList; - CFX_PtrArray ParamList; + CFX_ArrayTemplate<CPDF_Object*> ParamList; if (CPDF_Array* pDecoders = pDecoder->AsArray()) { CPDF_Array* pParamsArray = ToArray(pParams); if (!pParamsArray) @@ -357,8 +357,7 @@ FX_BOOL PDF_DataDecode(const uint8_t* src_buf, i == DecoderList.GetSize() - 1 ? last_estimated_size : 0; CFX_ByteString decoder = DecoderList[i]; // Use ToDictionary here because we can push NULL into the ParamList. - CPDF_Dictionary* pParam = - ToDictionary(static_cast<CPDF_Object*>(ParamList[i])); + CPDF_Dictionary* pParam = ToDictionary(ParamList[i]); uint8_t* new_buf = nullptr; FX_DWORD new_size = (FX_DWORD)-1; int offset = -1; |