summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_weak_ptr.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-11-21 13:50:32 -0500
committerdan sinclair <dsinclair@chromium.org>2016-11-21 18:51:10 +0000
commit85c8e7f788512ce5b5b43cd816e8091b57c3d5e7 (patch)
treee727d747684b9db2632ef250b55046cfce2b55a3 /core/fxcrt/cfx_weak_ptr.h
parent7daa6fb286d1b5d65f99521f3314083e86d93e3f (diff)
downloadpdfium-85c8e7f788512ce5b5b43cd816e8091b57c3d5e7.tar.xz
Fixup lint flags.
The -build/include setting was masking out build/include_what_you_use. This CL restores them, fixes any build errors, and adds NOLINT as needed. As well, the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd. lint cleanups Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f Reviewed-on: https://pdfium-review.googlesource.com/2030 Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_weak_ptr.h')
-rw-r--r--core/fxcrt/cfx_weak_ptr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fxcrt/cfx_weak_ptr.h b/core/fxcrt/cfx_weak_ptr.h
index f679696992..43ae5b881d 100644
--- a/core/fxcrt/cfx_weak_ptr.h
+++ b/core/fxcrt/cfx_weak_ptr.h
@@ -9,6 +9,7 @@
#include <cstddef>
#include <memory>
+#include <utility>
#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_system.h"
@@ -19,10 +20,11 @@ class CFX_WeakPtr {
CFX_WeakPtr() {}
CFX_WeakPtr(const CFX_WeakPtr& that) : m_pHandle(that.m_pHandle) {}
CFX_WeakPtr(CFX_WeakPtr&& that) { Swap(that); }
- CFX_WeakPtr(std::unique_ptr<T, D> pObj)
+ explicit CFX_WeakPtr(std::unique_ptr<T, D> pObj)
: m_pHandle(new Handle(std::move(pObj))) {}
// Deliberately implicit to allow passing nullptr.
+ // NOLINTNEXTLINE(runtime/explicit)
CFX_WeakPtr(std::nullptr_t arg) {}
explicit operator bool() const { return m_pHandle && !!m_pHandle->Get(); }