From 1480a2d05aff1eb6984882aacf39570b6b78a5d5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 25 Jan 2017 10:42:28 +0200 Subject: add 'explicit operator bool' to our reference classes Change-Id: I91cfbe2646dcc55b98d2b809c49c9ea073f54f58 Reviewed-on: https://gerrit.libreoffice.org/33517 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/rtl/ref.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/rtl') diff --git a/include/rtl/ref.hxx b/include/rtl/ref.hxx index b70088bcdfd3..5eeb857f8a42 100644 --- a/include/rtl/ref.hxx +++ b/include/rtl/ref.hxx @@ -195,6 +195,14 @@ public: return (m_pBody != NULL); } +#if defined LIBO_INTERNAL_ONLY + /** Returns True if the handle does point to a valid body. + */ + inline explicit operator bool() const + { + return is(); + } +#endif /** Returns True if this points to pBody. */ -- cgit