summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_simplefont.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-04 02:21:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-04 02:21:44 +0000
commit03395da5d5827b6b3049d8632d8d3f5545e45293 (patch)
tree910f8e48db49cfc9f88d6e621fd2a183038d6b1d /core/fpdfapi/font/cpdf_simplefont.h
parentf21b88ef08d6f6d64e783f55819fc8b86c3b370e (diff)
downloadpdfium-03395da5d5827b6b3049d8632d8d3f5545e45293.tar.xz
Set the CPDF_Font doc / font dict in the ctor.
Then we can mark the doc pointer as const because it never changes again. Also move initialization to headers when possible, add missing dtors, and fix some nits. Change-Id: I461affc8dce14d805b935fb4d8b5aaafb058a789 Reviewed-on: https://pdfium-review.googlesource.com/39413 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_simplefont.h')
-rw-r--r--core/fpdfapi/font/cpdf_simplefont.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/font/cpdf_simplefont.h b/core/fpdfapi/font/cpdf_simplefont.h
index 3aa68d73a6..77df55bf99 100644
--- a/core/fpdfapi/font/cpdf_simplefont.h
+++ b/core/fpdfapi/font/cpdf_simplefont.h
@@ -16,7 +16,7 @@
class CPDF_SimpleFont : public CPDF_Font {
public:
- CPDF_SimpleFont();
+ CPDF_SimpleFont(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict);
~CPDF_SimpleFont() override;
// CPDF_Font
@@ -39,7 +39,7 @@ class CPDF_SimpleFont : public CPDF_Font {
void LoadCharMetrics(int charcode);
CPDF_FontEncoding m_Encoding;
- int m_BaseEncoding;
+ int m_BaseEncoding = PDFFONT_ENCODING_BUILTIN;
bool m_bUseFontWidth;
std::vector<ByteString> m_CharNames;
uint16_t m_GlyphIndex[256];