summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-12 17:50:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-12 23:30:44 +0100
commiteb002da913cd1745b039bbc7e519542d7990fb49 (patch)
tree6a035877c86301a8d2184ff3026d5dae740a6789 /include
parentdcdaca599987ded1577bd04ed1e70f5bd02e943f (diff)
Remove obsolete "explicit operator bool" hack
...and fix the call sites that exploited the hack's internals being non- transparent. Change-Id: Ib3b06c3945e303d4088c4e1b65be5beed8613bac Reviewed-on: https://gerrit.libreoffice.org/46325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/scopedbitmapaccess.hxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/vcl/scopedbitmapaccess.hxx b/include/vcl/scopedbitmapaccess.hxx
index 05eb39587bac..bcdfa2b1bd20 100644
--- a/include/vcl/scopedbitmapaccess.hxx
+++ b/include/vcl/scopedbitmapaccess.hxx
@@ -45,9 +45,6 @@ namespace vcl
*/
template < class Access, class Bitmap, Access* (Bitmap::* Acquire)() > class ScopedBitmapAccess
{
- typedef ScopedBitmapAccess< Access, Bitmap, Acquire > self_type;
- typedef bool (self_type::* unspecified_bool_type)() const;
-
public:
explicit ScopedBitmapAccess( Bitmap& rBitmap ) :
mpAccess( nullptr ),
@@ -98,9 +95,9 @@ public:
}
bool operator!() const { return !mpAccess; }
- operator unspecified_bool_type() const
+ explicit operator bool() const
{
- return mpAccess ? &self_type::operator! : 0;
+ return mpAccess;
}
Access* get() { return mpAccess; }