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 /linguistic | |
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 'linguistic')
-rw-r--r-- | linguistic/source/convdic.cxx | 18 | ||||
-rw-r--r-- | linguistic/source/convdicxml.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 6a08b11498d8..6efba5177523 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -296,7 +296,7 @@ void ConvDic::AddEntry( const OUString &rLeftText, const OUString &rRightText ) DBG_ASSERT(!HasEntry( rLeftText, rRightText), "entry already exists" ); aFromLeft .emplace( rLeftText, rRightText ); - if (pFromRight.get()) + if (pFromRight) pFromRight->emplace( rRightText, rLeftText ); if (bMaxCharCountIsValid) @@ -320,7 +320,7 @@ void ConvDic::RemoveEntry( const OUString &rLeftText, const OUString &rRightText DBG_ASSERT( aLeftIt != aFromLeft.end(), "left map entry missing" ); aFromLeft .erase( aLeftIt ); - if (pFromRight.get()) + if (pFromRight) { ConvMap::iterator aRightIt = GetEntry( *pFromRight, rRightText, rLeftText ); DBG_ASSERT( aRightIt != pFromRight->end(), "right map entry missing" ); @@ -371,7 +371,7 @@ void SAL_CALL ConvDic::clear( ) { MutexGuard aGuard( GetLinguMutex() ); aFromLeft .clear(); - if (pFromRight.get()) + if (pFromRight) pFromRight->clear(); bNeedEntries = false; bIsModified = true; @@ -390,7 +390,7 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getConversions( { MutexGuard aGuard( GetLinguMutex() ); - if (!pFromRight.get() && eDirection == ConversionDirection_FROM_RIGHT) + if (!pFromRight && eDirection == ConversionDirection_FROM_RIGHT) return uno::Sequence< OUString >(); if (bNeedEntries) @@ -440,7 +440,7 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getConversionEntries( { MutexGuard aGuard( GetLinguMutex() ); - if (!pFromRight.get() && eDirection == ConversionDirection_FROM_RIGHT) + if (!pFromRight && eDirection == ConversionDirection_FROM_RIGHT) return uno::Sequence< OUString >(); if (bNeedEntries) @@ -497,7 +497,7 @@ sal_Int16 SAL_CALL ConvDic::getMaxCharCount( ConversionDirection eDirection ) { MutexGuard aGuard( GetLinguMutex() ); - if (!pFromRight.get() && eDirection == ConversionDirection_FROM_RIGHT) + if (!pFromRight && eDirection == ConversionDirection_FROM_RIGHT) { DBG_ASSERT( nMaxRightCharCount == 0, "max right char count should be 0" ); return 0; @@ -517,7 +517,7 @@ sal_Int16 SAL_CALL ConvDic::getMaxCharCount( ConversionDirection eDirection ) } nMaxRightCharCount = 0; - if (pFromRight.get()) + if (pFromRight) { for (auto const& elem : *pFromRight) { @@ -547,7 +547,7 @@ void SAL_CALL ConvDic::setPropertyType( // currently we assume that entries with the same left text have the // same PropertyType even if the right text is different... - if (pConvPropType.get()) + if (pConvPropType) pConvPropType->emplace( rLeftText, nPropertyType ); bIsModified = true; } @@ -562,7 +562,7 @@ sal_Int16 SAL_CALL ConvDic::getPropertyType( throw container::NoSuchElementException(); sal_Int16 nRes = ConversionPropertyType::NOT_DEFINED; - if (pConvPropType.get()) + if (pConvPropType) { // still assuming that entries with same left text have same PropertyType // even if they have different right text... diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx index 51ba74467120..0ee4844c1b38 100644 --- a/linguistic/source/convdicxml.cxx +++ b/linguistic/source/convdicxml.cxx @@ -333,7 +333,7 @@ void ConvDicXMLExport::ExportContent_() { OUString aLeftText(elem); AddAttribute( XML_NAMESPACE_TCD, "left-text", aLeftText ); - if (rDic.pConvPropType.get()) // property-type list available? + if (rDic.pConvPropType) // property-type list available? { sal_Int16 nPropertyType = -1; PropTypeMap::iterator aIt2 = rDic.pConvPropType->find( aLeftText ); diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index d62510c0645f..9d57c1432b29 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -1650,7 +1650,7 @@ bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName ) if (rServiceName == SN_SPELLCHECKER) { - if (!mxSpellDsp.get()) + if (!mxSpellDsp) GetSpellCheckerDsp_Impl(); pDsp = mxSpellDsp.get(); aLocales = getAvailableLocales( SN_SPELLCHECKER ); |