summaryrefslogtreecommitdiff
path: root/core/include/fxcodec
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/fxcodec
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/fxcodec')
-rw-r--r--core/include/fxcodec/fx_codec.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index da8b309dd6..afa0627648 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -22,7 +22,7 @@ class ICodec_IccModule;
class ICodec_FlateModule;
class ICodec_Jbig2Encoder;
class ICodec_ScanlineDecoder;
-class CCodec_ModuleMgr : public CFX_Object
+class CCodec_ModuleMgr
{
public:
@@ -80,7 +80,7 @@ protected:
ICodec_FlateModule* m_pFlateModule;
};
-class ICodec_BasicModule : public CFX_Object
+class ICodec_BasicModule
{
public:
@@ -92,7 +92,7 @@ public:
virtual ICodec_ScanlineDecoder* CreateRunLengthDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
int nComps, int bpc) = 0;
};
-class ICodec_ScanlineDecoder : public CFX_Object
+class ICodec_ScanlineDecoder
{
public:
@@ -118,7 +118,7 @@ public:
virtual void ClearImageData() = 0;
};
-class ICodec_FlateModule : public CFX_Object
+class ICodec_FlateModule
{
public:
@@ -133,7 +133,7 @@ public:
FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
virtual FX_BOOL Encode(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
};
-class ICodec_FaxModule : public CFX_Object
+class ICodec_FaxModule
{
public:
@@ -146,7 +146,7 @@ public:
virtual FX_BOOL Encode(FX_LPCBYTE src_buf, int width, int height, int pitch,
FX_LPBYTE& dest_buf, FX_DWORD& dest_size) = 0;
};
-class ICodec_JpegModule : public CFX_Object
+class ICodec_JpegModule
{
public:
@@ -181,7 +181,7 @@ public:
virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr = NULL) = 0;
};
-class ICodec_JpxModule : public CFX_Object
+class ICodec_JpxModule
{
public:
@@ -197,7 +197,7 @@ public:
virtual void DestroyDecoder(FX_LPVOID ctx) = 0;
};
-class ICodec_Jbig2Module : public CFX_Object
+class ICodec_Jbig2Module
{
public:
@@ -218,13 +218,13 @@ public:
virtual FXCODEC_STATUS ContinueDecode(void* pJbig2Content, IFX_Pause* pPause) = 0;
virtual void DestroyJbig2Context(void* pJbig2Content) = 0;
};
-class ICodec_Jbig2Encoder : public CFX_Object
+class ICodec_Jbig2Encoder
{
public:
virtual ~ICodec_Jbig2Encoder() {}
};
-class ICodec_IccModule : public CFX_Object
+class ICodec_IccModule
{
public:
typedef enum {