From b9e0190938f62bf21df078e47190a62ba33ddab2 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 9 Jan 2015 10:46:50 -0800 Subject: Fix -Wnon-virtual-dtor compiler warnings. This is done by explicitly adding a virtual dtor to interface classes, since the cost is small given that there are already virtual functions. The exceptions are for classes that have a Release() or Delete() method, in which case it is non-virtual and protected to indicate that the virtual class is never the deletion point. BUG= R=brucedawson@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/810883005 --- core/include/fxge/fx_font.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/include/fxge/fx_font.h') diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h index 52f8f30d8d..bf9bb40500 100644 --- a/core/include/fxge/fx_font.h +++ b/core/include/fxge/fx_font.h @@ -243,6 +243,7 @@ public: class IFX_FontEnumerator { public: + virtual ~IFX_FontEnumerator() { } virtual void HitFont() = 0; @@ -251,6 +252,7 @@ public: class IFX_AdditionalFontEnum { public: + virtual ~IFX_AdditionalFontEnum() { } virtual int CountFiles() = 0; virtual IFX_FileStream* GetFontFile(int index) = 0; }; @@ -296,6 +298,7 @@ class IFX_SystemFontInfo : public CFX_Object public: static IFX_SystemFontInfo* CreateDefault(); virtual void Release() = 0; + virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) = 0; virtual void* GetFont(FX_LPCSTR face) = 0; @@ -311,6 +314,8 @@ public: { return NULL; } +protected: + ~IFX_SystemFontInfo() { } }; class CFX_FolderFontInfo : public IFX_SystemFontInfo { @@ -423,6 +428,9 @@ class IFX_GSUBTable public: virtual void Release() = 0; virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; + +protected: + ~IFX_GSUBTable() { } }; IFX_GSUBTable* FXGE_CreateGSUBTable(CFX_Font* pFont); #endif -- cgit v1.2.3