Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: core/include/fxcrt/fx_basic.h

Issue 1393303004: Remove some checks for object creation failures. They cannot fail. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/include/fxcrt/fx_basic.h
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 9ed5fbafcf334820bd08d48dff43a7cdf8e60dc8..c5bb570fcabd06c4bbf763a68172144850f4a052 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 {
Tom Sepez 2015/10/09 16:47:31 This gets replaced with a ReleaseDelete, eh? Its
Lei Zhang 2015/10/19 08:05:51 Ya, it's not great, but it beats having to manuall
- 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 {

Powered by Google App Engine
This is Rietveld 408576698