summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-19 11:52:28 -0700
committerLei Zhang <thestig@chromium.org>2015-10-19 11:52:28 -0700
commit6101a5f98b27888f1736ae74982ed4d409d83be0 (patch)
tree84eedb3a83ba3b8ee88030a79842408cf8435c63 /core/include/fxcrt
parent1b5084321ed924ad3fcc437c3effc81baafd18ac (diff)
downloadpdfium-6101a5f98b27888f1736ae74982ed4d409d83be0.tar.xz
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 .
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r--core/include/fxcrt/fx_basic.h14
1 files changed, 0 insertions, 14 deletions
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 T>
-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 <size_t unit>
class CFX_SortListArray {