From 868150bd69f0f1f9472affc20deea0a9341bf22b Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 13 Jun 2016 14:57:29 -0700 Subject: Make code compile with clang_use_chrome_plugin (part I) This change contains files in core/fpdfapi directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2060973002 --- core/fpdfapi/fpdf_render/fpdf_render_text.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/fpdfapi/fpdf_render/fpdf_render_text.cpp') diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index 9e3a6c6587..5b0ad96aee 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -45,12 +45,15 @@ void CPDF_UniqueKeyGen::Generate(int count, ...) { } // namespace +CPDF_Type3Cache::CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} + CPDF_Type3Cache::~CPDF_Type3Cache() { for (const auto& pair : m_SizeMap) { delete pair.second; } m_SizeMap.clear(); } + CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(uint32_t charcode, const CFX_Matrix* pMatrix, FX_FLOAT retinaScaleX, @@ -77,10 +80,15 @@ CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(uint32_t charcode, pSizeCache->m_GlyphMap[charcode] = pGlyphBitmap; return pGlyphBitmap; } + +CPDF_Type3Glyphs::CPDF_Type3Glyphs() + : m_TopBlueCount(0), m_BottomBlueCount(0) {} + CPDF_Type3Glyphs::~CPDF_Type3Glyphs() { for (const auto& pair : m_GlyphMap) delete pair.second; } + static int _AdjustBlue(FX_FLOAT pos, int& count, int blues[]) { FX_FLOAT min_distance = 1000000.0f * 1.0f; int closest_pos = -1; -- cgit v1.2.3