diff options
author | Oliver Chang <ochang@chromium.org> | 2016-01-11 08:30:17 -0800 |
---|---|---|
committer | Oliver Chang <ochang@chromium.org> | 2016-01-11 08:30:17 -0800 |
commit | 14f39950451bb9c2a11fbc7173fd47367410f80f (patch) | |
tree | cec41364915b38e6a7709c76fc2fb02f6994990a /fpdfsdk/src/fpdf_flatten.cpp | |
parent | 9adfbb0920a258e916003b1ee9515e97879db82a (diff) | |
download | pdfium-14f39950451bb9c2a11fbc7173fd47367410f80f.tar.xz |
Use std::map as CPDF_Dictionary's underlying store.
Replaces CFX_CMapByteStringToPtr. XFA still uses CFX_CMapByteStringToPtr
so it's not completely removed just yet.
Adds begin()/end() to CPDF_Dictionary and removes the
GetStartPos()/GetNextElement() functions to traverse the dictionary.
Callers are changed accordingly. AddValue() is also removed.
R=tsepez@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1541703003 .
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_flatten.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp index 5c30b662c4..50d5036724 100644 --- a/fpdfsdk/src/fpdf_flatten.cpp +++ b/fpdfsdk/src/fpdf_flatten.cpp @@ -442,10 +442,9 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) { if (!sAnnotState.IsEmpty()) { pAPStream = pAPDic->GetStream(sAnnotState); } else { - FX_POSITION pos = pAPDic->GetStartPos(); - if (pos) { - CFX_ByteString sKey; - CPDF_Object* pFirstObj = pAPDic->GetNextElement(pos, sKey); + auto it = pAPDic->begin(); + if (it != pAPDic->end()) { + CPDF_Object* pFirstObj = it->second; if (pFirstObj) { if (pFirstObj->IsReference()) pFirstObj = pFirstObj->GetDirect(); |