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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 1700183002: Remove CFX_PtrList from renderer main loop. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 10 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
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
index f19e6f82589159047a9f639a001937356b3d9dd4..d2faac3b7ea7eef7d781bbe339a3a818f889e4cc 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -316,11 +316,10 @@ FX_BOOL CPDF_Type3Char::LoadBitmap(CPDF_RenderContext* pContext) {
if (m_pBitmap || !m_pForm) {
return TRUE;
}
- if (m_pForm->GetPageObjectList()->GetCount() == 1 && !m_bColored) {
- CPDF_PageObject* pPageObj = m_pForm->GetPageObjectList()->GetObjectAt(
- m_pForm->GetPageObjectList()->GetHeadPosition());
+ if (m_pForm->GetPageObjectList()->size() == 1 && !m_bColored) {
+ auto& pPageObj = m_pForm->GetPageObjectList()->front();
if (pPageObj->m_Type == CPDF_PageObject::IMAGE) {
- CPDF_ImageObject* pImage = (CPDF_ImageObject*)pPageObj;
+ CPDF_ImageObject* pImage = static_cast<CPDF_ImageObject*>(pPageObj.get());
m_ImageMatrix = pImage->m_Matrix;
const CFX_DIBSource* pSource = pImage->m_pImage->LoadDIBSource();
if (pSource) {
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | core/src/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698