summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_font.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-14 12:54:38 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-14 12:54:38 -0700
commit4926900ab54a493d236291b5a24dfa4476792182 (patch)
treee53800a0569300516c934bfccbb036ce39d98cb3 /core/include/fxge/fx_font.h
parenteddab4425614e49146f904f00da4a664ba4b581b (diff)
downloadpdfium-4926900ab54a493d236291b5a24dfa4476792182.tar.xz
Kill CFX_Object.
CFX_Object is a type that implements its own new operators that return NULL on error. There's no need for this given the |new (std::nothrow)| syntax; in fact, the current code can only work if there is no activity in the constructors. This may explain the pervasive lack of constructors and reliance on Init() methods throughout the codebase. The activity takes place in fx_memory.h, where FX_NEW is mapped onto the std::nothrow syntax. The rest is just cleanup. Down the road, we will simply throw and remove all the error-checking paths for new objects. Landing this patch first will at least show a simple path back to the old behaviour without having to re-introduce CFX_Object should someone want to do so in their own fork. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1088733002
Diffstat (limited to 'core/include/fxge/fx_font.h')
-rw-r--r--core/include/fxge/fx_font.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index bf9bb40500..6e0c1ba881 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -50,7 +50,7 @@ class CFontFileFaceInfo;
#define FXFONT_FF_SCRIPT (4<<4)
#define FXFONT_FW_NORMAL 400
#define FXFONT_FW_BOLD 700
-class CFX_Font : public CFX_Object
+class CFX_Font
{
public:
CFX_Font();
@@ -145,7 +145,7 @@ protected:
};
#define ENCODING_INTERNAL 0
#define ENCODING_UNICODE 1
-class IFX_FontEncoding : public CFX_Object
+class IFX_FontEncoding
{
public:
virtual ~IFX_FontEncoding() {}
@@ -164,7 +164,7 @@ IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont);
#define FXFONT_SUBST_NONSYMBOL 0x20
#define FXFONT_SUBST_EXACT 0x40
#define FXFONT_SUBST_STANDARD 0x80
-class CFX_SubstFont : public CFX_Object
+class CFX_SubstFont
{
public:
@@ -199,7 +199,7 @@ typedef struct {
FX_LPCBYTE m_pFontData;
FX_DWORD m_dwSize;
} FoxitFonts;
-class CFX_FontMgr : public CFX_Object
+class CFX_FontMgr
{
public:
CFX_FontMgr();
@@ -229,7 +229,7 @@ public:
FXFT_Library m_FTLibrary;
FoxitFonts m_ExternalFonts[16];
};
-class IFX_FontMapper : public CFX_Object
+class IFX_FontMapper
{
public:
@@ -293,7 +293,7 @@ private:
FXFT_Face m_FoxitFaces[14];
IFX_FontEnumerator* m_pFontEnumerator;
};
-class IFX_SystemFontInfo : public CFX_Object
+class IFX_SystemFontInfo
{
public:
static IFX_SystemFontInfo* CreateDefault();
@@ -339,14 +339,14 @@ protected:
void ScanFile(CFX_ByteString& path);
void ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_DWORD filesize, FX_DWORD offset);
};
-class CFX_CountedFaceCache : public CFX_Object
+class CFX_CountedFaceCache
{
public:
CFX_FaceCache* m_Obj;
FX_DWORD m_nCount;
};
typedef CFX_MapPtrTemplate<FXFT_Face, CFX_CountedFaceCache*> CFX_FTCacheMap;
-class CFX_FontCache : public CFX_Object
+class CFX_FontCache
{
public:
~CFX_FontCache();
@@ -374,14 +374,14 @@ public:
CFX_Font* m_pFont;
};
#define FX_FONTCACHE_DEFINE(pFontCache, pFont) CFX_AutoFontCache autoFontCache((pFontCache), (pFont))
-class CFX_GlyphBitmap : public CFX_Object
+class CFX_GlyphBitmap
{
public:
int m_Top;
int m_Left;
CFX_DIBitmap m_Bitmap;
};
-class CFX_FaceCache : public CFX_Object
+class CFX_FaceCache
{
public:
~CFX_FaceCache();