summaryrefslogtreecommitdiff
path: root/include/com/sun
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-25 10:42:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-26 06:11:42 +0000
commit1480a2d05aff1eb6984882aacf39570b6b78a5d5 (patch)
treedf6e8acc845d7ac71e6bf870b3ac6d956d914c7b /include/com/sun
parentb41186a2fc49e440890b8c86e5367352ffaf9cd6 (diff)
add 'explicit operator bool' to our reference classes
Change-Id: I91cfbe2646dcc55b98d2b809c49c9ea073f54f58 Reviewed-on: https://gerrit.libreoffice.org/33517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/com/sun')
-rw-r--r--include/com/sun/star/uno/Reference.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h
index e657fd84b197..af2dc299b8e0 100644
--- a/include/com/sun/star/uno/Reference.h
+++ b/include/com/sun/star/uno/Reference.h
@@ -93,6 +93,15 @@ public:
inline bool SAL_CALL is() const
{ return (NULL != _pInterface); }
+#if defined LIBO_INTERNAL_ONLY
+ /** Checks if reference is null.
+
+ @return true if reference acquires an interface, i.e. true if it is not null
+ */
+ inline explicit operator bool() const
+ { return is(); }
+#endif
+
/** Equality operator: compares two interfaces
Checks if both references are null or refer to the same object.