From 6101a5f98b27888f1736ae74982ed4d409d83be0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 19 Oct 2015 11:52:28 -0700 Subject: Remove some checks for object creation failures. They cannot fail. Also reduce nesting in if statements, remove CFX_SmartPointer, and use more unique_ptrs. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1393303004 . --- core/include/fxcrt/fx_basic.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'core/include/fxcrt/fx_basic.h') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 9ed5fbafcf..c5bb570fca 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -955,20 +955,6 @@ struct ReleaseDeleter { inline void operator()(T* ptr) const { ptr->Release(); } }; -// TODO(thestig) Remove in favor of nonstd::unique_ptr. -template -class CFX_SmartPointer { - public: - CFX_SmartPointer(T* pObj) : m_pObj(pObj) {} - ~CFX_SmartPointer() { m_pObj->Release(); } - T* Get(void) { return m_pObj; } - T& operator*(void) { return *m_pObj; } - T* operator->(void) { return m_pObj; } - - protected: - T* m_pObj; -}; - #define FX_DATALIST_LENGTH 1024 template class CFX_SortListArray { -- cgit v1.2.3