summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-05-28 08:26:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-28 09:48:09 +0200
commite84d05483cc5f30161dc5b15f93fb3bf71ed636e (patch)
tree2a343319cb4c1e06060b632de4fc840ba96bb70f /dbaccess
parent412ff42bf0a6d078b9a6fd1daa8d0eb0b9a78c4a (diff)
Make loplugin:simplifypointertobool handle parenthesized expressions
...as discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index c7bb190ab34e..578574d933a5 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -766,7 +766,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
ActivateAggregate( tpColumnName );
ActivateAggregate( tpType );
- OSL_ENSURE(pFieldType.get(),"We need a type information here!");
+ OSL_ENSURE(pFieldType,"We need a type information here!");
// If the type has changed, substitute Controls
if( m_pPreviousType != pFieldType )
{
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 865a580b3947..e7c5a72ffbb3 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1074,7 +1074,7 @@ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo)
if ( !pTypeInfo ) // just a fallback
pTypeInfo = queryTypeInfoByType(DataType::VARCHAR,_rTypeInfo);
- OSL_ENSURE(pTypeInfo.get(),"checkColumns: can't find a type which is usable as a key!");
+ OSL_ENSURE(pTypeInfo,"checkColumns: can't find a type which is usable as a key!");
return pTypeInfo;
}