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_render | |
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_render')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp | 6 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/render_int.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp index a714d38615..8cfa8dc4fb 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -358,10 +358,10 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text( const CPDF_TextObject* textobj, const CFX_AffineMatrix* pObj2Device) { CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->GetType3Font(); - for (int j = 0; j < m_Type3FontCache.GetSize(); j++) - if ((CPDF_Type3Font*)m_Type3FontCache.GetAt(j) == pType3Font) { + for (int j = 0; j < m_Type3FontCache.GetSize(); j++) { + if (m_Type3FontCache.GetAt(j) == pType3Font) return TRUE; - } + } CFX_Matrix dCTM = m_pDevice->GetCTM(); FX_FLOAT sa = FXSYS_fabs(dCTM.a); FX_FLOAT sd = FXSYS_fabs(dCTM.d); diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index dbc9f1102b..d764c9a5ff 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -137,11 +137,12 @@ class CPDF_RenderStatus { FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj, const CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause); + CPDF_RenderContext* GetContext() { return m_pContext; } + CPDF_RenderOptions m_Options; CPDF_Dictionary* m_pFormResource; CPDF_Dictionary* m_pPageResource; - CFX_PtrArray m_Type3FontCache; - CPDF_RenderContext* GetContext() { return m_pContext; } + CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache; protected: friend class CPDF_ImageRenderer; |