From 68e797402692c5c8abf1b2c4374e12a8d2707d07 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 23 Aug 2023 13:47:40 +0200 Subject: new loplugin:optionalbool which warns against using the 'operator bool' conversion of std::optional which can lead to interesting bugs The bugs that this plugin have been submitted independantly, so this change is just using has_value() in relevant places. Change-Id: I259b837feeecddcb8cd1d7e5db1e85bf505907cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155978 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/ext/ucpext_content.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ucb/source') diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 24101016810f..ee9966a52b30 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -577,7 +577,7 @@ namespace ucb::ucp::ext bool Content::impl_isFolder() { - if ( !!m_aIsFolder ) + if ( m_aIsFolder.has_value() ) return *m_aIsFolder; bool bIsFolder = false; -- cgit