From ce4ffb8183af3fa2bb5133f0f7370a88e064c516 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 17 Aug 2015 16:26:03 -0700 Subject: CFX_MapByteStringToPtr considered harmful. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1297723002 . --- core/src/fpdfapi/fpdf_render/render_int.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'core/src/fpdfapi/fpdf_render/render_int.h') diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index 733e24cbcf..e195472ac1 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -12,8 +12,11 @@ #include "../../../../third_party/base/nonstd_unique_ptr.h" #include "../../../include/fpdfapi/fpdf_pageobj.h" +class CFX_GlyphBitmap; class CPDF_QuickStretcher; + #define TYPE3_MAX_BLUES 16 + class CPDF_Type3Glyphs { public: CPDF_Type3Glyphs() { @@ -30,11 +33,11 @@ class CPDF_Type3Glyphs { int m_TopBlue[TYPE3_MAX_BLUES], m_BottomBlue[TYPE3_MAX_BLUES]; int m_TopBlueCount, m_BottomBlueCount; }; -class CFX_GlyphBitmap; class CPDF_Type3Cache { public: - CPDF_Type3Cache(CPDF_Type3Font* pFont) { m_pFont = pFont; } + explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} ~CPDF_Type3Cache(); + CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, @@ -46,8 +49,8 @@ class CPDF_Type3Cache { const CFX_AffineMatrix* pMatrix, FX_FLOAT retinaScaleX = 1.0f, FX_FLOAT retinaScaleY = 1.0f); - CPDF_Type3Font* m_pFont; - CFX_MapByteStringToPtr m_SizeMap; + CPDF_Type3Font* const m_pFont; + std::map m_SizeMap; }; class CPDF_TransferFunc { public: -- cgit v1.2.3