diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-19 11:22:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-19 11:03:42 +0100 |
commit | 34ea5c21a752364caef9727850ef34943ad5c752 (patch) | |
tree | cfda8f313f8cc1b574c54caf104306319c2ac13f /include/tools/weakbase.h | |
parent | 5ac6f02fdc6015a5d78071570dee310febf95fc6 (diff) |
add operator* to tools::WeakReference
which fixes warnings from
commit ef37ab245b8095895f715217236e8e2fb90613c6
Date: Thu Mar 19 09:21:45 2020 +0200
loplugin:redundantpointerops add some more smart pointer types
which I pushed earlier, where I added tools::WeakReference to the list
of smart pointer types, but of course the conversion it recommended is
not possible without an operator*
Change-Id: I9433b7aba46a3a15f9d833847ae3659367388109
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90735
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools/weakbase.h')
-rw-r--r-- | include/tools/weakbase.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tools/weakbase.h b/include/tools/weakbase.h index 458381e47fff..e614efcc4111 100644 --- a/include/tools/weakbase.h +++ b/include/tools/weakbase.h @@ -97,6 +97,9 @@ public: /** returns the pointer to the reference object or null */ inline reference_type * operator->() const; + /** returns a ref to the reference object */ + inline reference_type& operator*() const; + /** returns true if this instance references pReferenceObject */ inline bool operator== (const reference_type * pReferenceObject) const; |