Index: core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
index d8f21c692de4b316a7c5fa071a8abf305b1c06ff..dd16aa85ce6d387ab75868c4de6de1ecc3b2b5cd 100644 |
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp |
@@ -458,10 +458,9 @@ void CPDF_AllStates::SetLineDash(CPDF_Array* pArray, |
void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, |
CPDF_StreamContentParser* pParser) { |
CPDF_GeneralStateData* pGeneralState = m_GeneralState.GetModify(); |
- FX_POSITION pos = pGS->GetStartPos(); |
- while (pos) { |
- CFX_ByteString key_str; |
- CPDF_Object* pElement = pGS->GetNextElement(pos, key_str); |
+ for (const auto& it : *pGS) { |
+ const CFX_ByteString& key_str = it.first; |
+ CPDF_Object* pElement = it.second; |
CPDF_Object* pObject = pElement ? pElement->GetDirect() : nullptr; |
if (!pObject) |
continue; |