summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_retain_ptr.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-31 13:19:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-31 17:29:26 +0000
commitbcd1e70175b6bbbcb9d9466c579e0538f34297c6 (patch)
tree9748923cde5a3e52054488fbad5f9dbb855aecc0 /core/fxcrt/cfx_retain_ptr.h
parentbc0ca1ec9b157ab8773c9043725c7422f7c1a57c (diff)
downloadpdfium-bcd1e70175b6bbbcb9d9466c579e0538f34297c6.tar.xz
Remove fx_basic.h
This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_retain_ptr.h')
-rw-r--r--core/fxcrt/cfx_retain_ptr.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/fxcrt/cfx_retain_ptr.h b/core/fxcrt/cfx_retain_ptr.h
index 32a77c5a6c..d3896ba6ae 100644
--- a/core/fxcrt/cfx_retain_ptr.h
+++ b/core/fxcrt/cfx_retain_ptr.h
@@ -9,7 +9,13 @@
#include <memory>
#include <utility>
-#include "core/fxcrt/fx_memory.h"
+#include "core/fxcrt/fx_system.h"
+
+// Used with std::unique_ptr to Release() objects that can't be deleted.
+template <class T>
+struct ReleaseDeleter {
+ inline void operator()(T* ptr) const { ptr->Release(); }
+};
// Analogous to base's scoped_refptr.
template <class T>
@@ -25,6 +31,7 @@ class CFX_RetainPtr {
CFX_RetainPtr(CFX_RetainPtr&& that) noexcept { Swap(that); }
// Deliberately implicit to allow returning nullptrs.
+ // NOLINTNEXTLINE(runtime/explicit)
CFX_RetainPtr(std::nullptr_t ptr) {}
template <class U>