From aeed331f7307612fbc4ebac4764cd39f6f2352e9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 30 Nov 2019 13:54:48 +0100 Subject: 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 --- include/connectivity/sqlerror.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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( rhs ) ) { } - bool is() const { return !base_type::operator!(); } + bool is() const { return bool(*this); } }; -- cgit