diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-30 13:54:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-30 15:00:01 +0100 |
commit | aeed331f7307612fbc4ebac4764cd39f6f2352e9 (patch) | |
tree | 85cef046ed88703751c129de8722f428bc9c44c1 /include | |
parent | b2c3528cc400bd2c10e56bd9d49e3339013ae388 (diff) |
Rewrite ParamValue::is
...without using boost::optional<>::operator! (in preparation for replacing
boost::optional with std::optional, which doesn't have an operator! using
is_initialized() would not be helpful, as std::optional doesn't have it either;
using has_value() would arguably be even cleaner, but boost::optional only has
it since Boost 1.68, so some --with-system-boost builds might not have it)
Change-Id: Iee3c71c8e6ea93fb25221768880442f42f410b83
Reviewed-on: https://gerrit.libreoffice.org/84115
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/connectivity/sqlerror.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/connectivity/sqlerror.hxx b/include/connectivity/sqlerror.hxx index be1112bda46f..9b4c60c49476 100644 --- a/include/connectivity/sqlerror.hxx +++ b/include/connectivity/sqlerror.hxx @@ -72,7 +72,7 @@ namespace connectivity ParamValue( OUString const& val ) : base_type( val ) { } ParamValue( ParamValue const& rhs ) : base_type( static_cast<base_type const&>( rhs ) ) { } - bool is() const { return !base_type::operator!(); } + bool is() const { return bool(*this); } }; |