Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: core/fpdfapi/fpdf_page/cpdf_allstates.cpp

Issue 1867183002: Use std::vector as internal storage for CPDF_Array (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_page/cpdf_allstates.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
index d81a488d2070cdbfc8b00e3e3fbb8cc9970720cf..3ac9b9ae811b8d1ae083e417f645024e754a5ed1 100644
--- a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
@@ -46,10 +46,9 @@ void CPDF_AllStates::SetLineDash(CPDF_Array* pArray,
FX_FLOAT scale) {
CFX_GraphStateData* pData = m_GraphState.GetModify();
pData->m_DashPhase = phase * scale;
- pData->SetDashCount(pArray->GetCount());
- for (uint32_t i = 0; i < pArray->GetCount(); i++) {
+ pData->SetDashCount(static_cast<int>(pArray->GetCount()));
+ for (size_t i = 0; i < pArray->GetCount(); i++)
pData->m_DashArray[i] = pArray->GetNumberAt(i) * scale;
- }
}
void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS,

Powered by Google App Engine
This is Rietveld 408576698