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 /comphelper | |
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 'comphelper')
-rw-r--r-- | comphelper/source/container/enumerablemap.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/property/opropertybag.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index 3c5fe7951792..eb21b1795834 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -349,7 +349,7 @@ namespace comphelper // create the comparator for the KeyType, and throw if the type is not supported std::unique_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, nullptr ) ); - if ( !pComparator.get() ) + if (!pComparator) throw IllegalTypeException("Unsupported key type.", *this ); // init members @@ -369,7 +369,7 @@ namespace comphelper void EnumerableMap::impl_initValues_throw( const Sequence< Pair< Any, Any > >& _initialValues ) { OSL_PRECOND( m_aData.m_pValues.get() && m_aData.m_pValues->empty(), "EnumerableMap::impl_initValues_throw: illegal call!" ); - if ( !m_aData.m_pValues.get() || !m_aData.m_pValues->empty() ) + if (!m_aData.m_pValues || !m_aData.m_pValues->empty()) throw RuntimeException(); const Pair< Any, Any >* mapping = _initialValues.getConstArray(); diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 718d04b56fb9..43dfc4cfdc71 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -277,7 +277,7 @@ namespace comphelper ::cppu::IPropertyArrayHelper& SAL_CALL OPropertyBag::getInfoHelper() { - if ( !m_pArrayHelper.get() ) + if (!m_pArrayHelper) { Sequence< Property > aProperties; m_aDynamicProperties.describeProperties( aProperties ); |