diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-16 15:23:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-17 08:25:47 +0200 |
commit | ccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch) | |
tree | 2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /toolkit | |
parent | da5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff) |
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer
Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd
Reviewed-on: https://gerrit.libreoffice.org/61837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/grid/sortablegriddatamodel.cxx | 3 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/helper/accessibilityclient.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/helper/formpdfexport.cxx | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index c8a5acdd8ae9..9f7edd97a369 100644 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -552,7 +552,8 @@ void lcl_clear( STLCONTAINER& i_container ) // get predicate object ::std::unique_ptr< ::comphelper::IKeyPredicateLess > const pPredicate( ::comphelper::getStandardLessPredicate( dataType, m_collator ) ); - ENSURE_OR_RETURN_FALSE( pPredicate.get(), "SortableGridDataModel::impl_reIndex_nothrow: no sortable data found!" ); + ENSURE_OR_RETURN_FALSE( + pPredicate, "SortableGridDataModel::impl_reIndex_nothrow: no sortable data found!"); // then sort CellDataLessComparison const aComparator( aColumnData, *pPredicate, i_sortAscending ); diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 69aaa59d3d19..e27ec6da790e 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -1312,7 +1312,7 @@ void UnoControlModel::setPropertyValues( const css::uno::Sequence< OUString >& r { if ( ( pHandles[n] >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( pHandles[n] <= BASEPROPERTY_FONTDESCRIPTORPART_END ) ) { - if ( !pFD.get() ) + if (!pFD) { css::uno::Any* pProp = &maData[ BASEPROPERTY_FONTDESCRIPTOR ]; pFD.reset( new awt::FontDescriptor ); @@ -1339,7 +1339,7 @@ void UnoControlModel::setPropertyValues( const css::uno::Sequence< OUString >& r // same as a few lines above // Don't merge FD property into array, as it is sorted - if ( pFD.get() ) + if (pFD) { css::uno::Any aValue; aValue <<= *pFD; diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx index ec866fbc6a93..bc7ed5db956b 100644 --- a/toolkit/source/helper/accessibilityclient.cxx +++ b/toolkit/source/helper/accessibilityclient.cxx @@ -159,7 +159,7 @@ namespace toolkit #if HAVE_FEATURE_DESKTOP // load the library implementing the factory - if ( !s_pFactory.get() ) + if (!s_pFactory) { #ifndef DISABLE_DYNLOADING const OUString sModuleName( SVLIBRARY( "acc" ) ); @@ -191,7 +191,7 @@ namespace toolkit } #endif // HAVE_FEATURE_DESKTOP - if ( !s_pFactory.get() ) + if (!s_pFactory) // the attempt to load the lib, or to create the factory, failed // -> fall back to a dummy factory s_pFactory = new AccessibleDummyFactory; diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index 3d790c70b11e..d0399e6f7a39 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -268,7 +268,7 @@ namespace toolkitform Reference< XPropertySet > xModelProps( _rxControl->getModel(), UNO_QUERY ); sal_Int16 nControlType = classifyFormControl( xModelProps ); Descriptor.reset( createDefaultWidget( nControlType ) ); - if ( !Descriptor.get() ) + if (!Descriptor) // no PDF widget available for this return Descriptor; |