diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-17 16:38:51 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-17 16:38:51 -0700 |
commit | ff8347a4b16f000be628c5e10d03a1e1c17537eb (patch) | |
tree | 1d46e77a1ef6b28def6af3ffdd576017a6cfe229 /core/include/fxge/fx_font.h | |
parent | c4d9f6ad2dc922b574862cd2f6f0a899d7e169e3 (diff) | |
download | pdfium-ff8347a4b16f000be628c5e10d03a1e1c17537eb.tar.xz |
Replace some Release() calls with virtual destructors.
A virtual method that does |delete this| is an anti-pattern.
Some classes can be de-virtualized instead.
Throw in some unique_ptrs and delete dead code for good measure.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1192013002.
Diffstat (limited to 'core/include/fxge/fx_font.h')
-rw-r--r-- | core/include/fxge/fx_font.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h index 49b8f9a974..31794d6743 100644 --- a/core/include/fxge/fx_font.h +++ b/core/include/fxge/fx_font.h @@ -424,12 +424,9 @@ FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, class IFX_GSUBTable { public: - virtual void Release() = 0; + static IFX_GSUBTable* Create(CFX_Font* pFont); + virtual ~IFX_GSUBTable() { } virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; - -protected: - ~IFX_GSUBTable() { } }; -IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont); #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |