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/fxcrt/fx_basic.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/fxcrt/fx_basic.h')
-rw-r--r-- | core/include/fxcrt/fx_basic.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 45a5a6e23c..7b700d36a8 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -27,7 +27,7 @@ template <typename T, size_t N> char (&ArraySizeHelper(T (&array)[N]))[N]; -class CFX_BinaryBuf : public CFX_Object +class CFX_BinaryBuf { public: CFX_BinaryBuf(); @@ -155,7 +155,7 @@ public: CFX_WideStringC GetWideString() const; }; -class CFX_ArchiveSaver : public CFX_Object +class CFX_ArchiveSaver { public: CFX_ArchiveSaver() : m_pStream(NULL) {} @@ -198,7 +198,7 @@ protected: IFX_FileStream* m_pStream; }; -class CFX_ArchiveLoader : public CFX_Object +class CFX_ArchiveLoader { public: @@ -260,7 +260,7 @@ protected: FX_STRSIZE m_Length; }; -class CFX_FileBufferArchive : public IFX_BufferArchive, public CFX_Object +class CFX_FileBufferArchive : public IFX_BufferArchive { public: CFX_FileBufferArchive(FX_STRSIZE size = 32768); @@ -352,7 +352,7 @@ CFX_ByteString FX_UrlEncode(const CFX_WideString& wsUrl); CFX_WideString FX_UrlDecode(const CFX_ByteString& bsUrl); CFX_ByteString FX_EncodeURI(const CFX_WideString& wsURI); CFX_WideString FX_DecodeURI(const CFX_ByteString& bsURI); -class CFX_BasicArray : public CFX_Object +class CFX_BasicArray { protected: CFX_BasicArray(int unit_size); @@ -665,7 +665,7 @@ public: }; typedef CFX_ObjectArray<CFX_ByteString> CFX_ByteStringArray; typedef CFX_ObjectArray<CFX_WideString> CFX_WideStringArray; -class CFX_BaseSegmentedArray : public CFX_Object +class CFX_BaseSegmentedArray { public: CFX_BaseSegmentedArray(int unit_size = 1, int segment_units = 512, int index_size = 8); @@ -734,7 +734,7 @@ public: } }; template <class DataType, int FixedSize> -class CFX_FixedBufGrow : public CFX_Object +class CFX_FixedBufGrow { public: CFX_FixedBufGrow() : m_pData(NULL) @@ -799,7 +799,7 @@ public: private: DataType* m_pData; }; -class CFX_MapPtrToPtr : public CFX_Object +class CFX_MapPtrToPtr { protected: @@ -916,7 +916,7 @@ public: rValue = (ValueType)(FX_UINTPTR)pValue; } }; -class CFX_CMapDWordToDWord : public CFX_Object +class CFX_CMapDWordToDWord { public: @@ -933,7 +933,7 @@ protected: CFX_BinaryBuf m_Buffer; }; -class CFX_MapByteStringToPtr : public CFX_Object +class CFX_MapByteStringToPtr { protected: @@ -1013,7 +1013,7 @@ public: ~CFX_MapByteStringToPtr(); }; -class CFX_CMapByteStringToPtr : public CFX_Object +class CFX_CMapByteStringToPtr { public: CFX_CMapByteStringToPtr(); @@ -1041,7 +1041,7 @@ private: CFX_BaseSegmentedArray m_Buffer; }; -class CFX_PtrList : public CFX_Object +class CFX_PtrList { protected: @@ -1190,7 +1190,7 @@ protected: void AddData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback, FX_BOOL bSelfDestruct); }; -class CFX_BitStream : public CFX_Object +class CFX_BitStream { public: @@ -1223,7 +1223,7 @@ protected: FX_LPCBYTE m_pData; }; -template <class ObjClass> class CFX_CountRef : public CFX_Object +template <class ObjClass> class CFX_CountRef { public: @@ -1373,7 +1373,7 @@ public: virtual ~IFX_Pause() { } virtual FX_BOOL NeedToPauseNow() = 0; }; -class CFX_DataFilter : public CFX_Object +class CFX_DataFilter { public: @@ -1448,7 +1448,7 @@ protected: }; #define FX_DATALIST_LENGTH 1024 template<size_t unit> -class CFX_SortListArray : public CFX_Object +class CFX_SortListArray { protected: @@ -1562,7 +1562,7 @@ protected: CFX_ArrayTemplate<DataList> m_DataLists; }; template<typename T1, typename T2> -class CFX_ListArrayTemplate : public CFX_Object +class CFX_ListArrayTemplate { public: @@ -1603,7 +1603,7 @@ typedef enum { #define ProgressiveStatus FX_ProgressiveStatus #define FX_NAMESPACE_DECLARE(namespace, type) namespace::type -class CFX_Vector_3by1 : public CFX_Object +class CFX_Vector_3by1 { public: @@ -1619,7 +1619,7 @@ public: FX_FLOAT b; FX_FLOAT c; }; -class CFX_Matrix_3by3 : public CFX_Object +class CFX_Matrix_3by3 { public: |