summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-08 12:36:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-10 12:02:44 +0200
commit366d08f2f6d4de922f6099c62bb81b49d89e0a68 (patch)
treeb232884af6e844c2f0994859e4b42efbc1ce654c /include
parent75a2257a5bd716a9f937abe5e53f305c983afd5d (diff)
new loplugin:simplifypointertobool
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/tools/weakbase.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tools/weakbase.h b/include/tools/weakbase.h
index e614efcc4111..0f9a500bb55b 100644
--- a/include/tools/weakbase.h
+++ b/include/tools/weakbase.h
@@ -88,6 +88,9 @@ public:
/** returns true if the reference object is not null and still alive */
inline bool is() const;
+ /** returns true if the reference object is not null and still alive */
+ operator bool() const { return is(); }
+
/** returns the pointer to the reference object or null */
inline reference_type * get() const;