From 29cd8b9631408c0360c744e23a2733d24c9224ec Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 19 Oct 2015 12:08:54 -0700 Subject: Merge to XFA: Remove some checks for object creation failures. They cannot fail. Also reduce nesting in if statements, remove CFX_SmartPointer, and use more unique_ptrs. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1393303004 . (cherry picked from commit 6101a5f98b27888f1736ae74982ed4d409d83be0) Review URL: https://codereview.chromium.org/1413223002 . --- 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 b85d737327..44e6a46ae7 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -1084,20 +1084,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