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/render_int.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/fpdf_render/render_int.h') diff --git a/core/fpdfapi/fpdf_render/render_int.h b/core/fpdfapi/fpdf_render/render_int.h index f373b9371a..67eae91f59 100644 --- a/core/fpdfapi/fpdf_render/render_int.h +++ b/core/fpdfapi/fpdf_render/render_int.h @@ -50,8 +50,9 @@ FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix); class CPDF_Type3Glyphs { public: - CPDF_Type3Glyphs() : m_TopBlueCount(0), m_BottomBlueCount(0) {} + CPDF_Type3Glyphs(); ~CPDF_Type3Glyphs(); + void AdjustBlue(FX_FLOAT top, FX_FLOAT bottom, int& top_line, @@ -63,9 +64,10 @@ class CPDF_Type3Glyphs { int m_TopBlueCount; int m_BottomBlueCount; }; + class CPDF_Type3Cache { public: - explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} + explicit CPDF_Type3Cache(CPDF_Type3Font* pFont); ~CPDF_Type3Cache(); CFX_GlyphBitmap* LoadGlyph(uint32_t charcode, @@ -605,12 +607,12 @@ class CPDF_DIBSource : public CFX_DIBSource { #define FPDF_HUGE_IMAGE_SIZE 60000000 class CPDF_DIBTransferFunc : public CFX_FilteredDIB { public: - CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); + explicit CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); ~CPDF_DIBTransferFunc() override; // CFX_FilteredDIB FXDIB_Format GetDestFormat() override; - FX_ARGB* GetDestPalette() override { return nullptr; } + FX_ARGB* GetDestPalette() override; void TranslateScanline(uint8_t* dest_buf, const uint8_t* src_buf) const override; void TranslateDownSamples(uint8_t* dest_buf, -- cgit v1.2.3