diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-14 12:54:38 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-14 12:54:38 -0700 |
commit | 4926900ab54a493d236291b5a24dfa4476792182 (patch) | |
tree | e53800a0569300516c934bfccbb036ce39d98cb3 /core/include/fpdfapi/fpdf_pageobj.h | |
parent | eddab4425614e49146f904f00da4a664ba4b581b (diff) | |
download | pdfium-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/fpdfapi/fpdf_pageobj.h')
-rw-r--r-- | core/include/fpdfapi/fpdf_pageobj.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h index f211254791..bd11a209f0 100644 --- a/core/include/fpdfapi/fpdf_pageobj.h +++ b/core/include/fpdfapi/fpdf_pageobj.h @@ -99,7 +99,7 @@ public: return m_pObject->IsRect(); } }; -class CPDF_ClipPathData : public CFX_Object +class CPDF_ClipPathData { public: @@ -161,7 +161,7 @@ public: void Transform(const CFX_AffineMatrix& matrix); }; -class CPDF_ColorStateData : public CFX_Object +class CPDF_ColorStateData { public: @@ -208,7 +208,7 @@ class CPDF_GraphState : public CFX_CountRef<CFX_GraphStateData> { public: }; -class CPDF_TextStateData : public CFX_Object +class CPDF_TextStateData { public: @@ -267,7 +267,7 @@ public: }; class CPDF_TransferFunc; -class CPDF_GeneralStateData : public CFX_Object +class CPDF_GeneralStateData { public: @@ -336,7 +336,7 @@ public: return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha : m_pObject->m_FillAlpha) * 255) : 255; } }; -class CPDF_ContentMarkItem : public CFX_Object +class CPDF_ContentMarkItem { public: @@ -388,7 +388,7 @@ private: void* m_pParam; }; -class CPDF_ContentMarkData : public CFX_Object +class CPDF_ContentMarkData { public: @@ -434,7 +434,7 @@ public: #define PDFPAGE_SHADING 4 #define PDFPAGE_FORM 5 #define PDFPAGE_INLINES 6 -class CPDF_GraphicStates : public CFX_Object +class CPDF_GraphicStates { public: @@ -507,7 +507,7 @@ protected: virtual ~CPDF_PageObject() {} }; -struct CPDF_TextObjectItem : public CFX_Object { +struct CPDF_TextObjectItem { FX_DWORD m_CharCode; |