swref: Use SvRef::get() instead of &*
Using &* can be problematic if the pointer is null. In this case it doesn’t matter, but using SvRef::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I802417762ed323128a07d4f8ccbcf8bb8553a8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211845 Reviewed-by: Neil Roberts <nroberts@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
@@ -224,7 +224,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
|
||||
const_cast<SwServerObject*>(this)->m_eType = NONE_SERVER;
|
||||
for( size_t n = rLnks.size(); n; )
|
||||
{
|
||||
const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
|
||||
const ::sfx2::SvBaseLink* pLnk = rLnks[ --n ].get();
|
||||
if (sfx2::SvBaseLinkObjectType::ClientGraphic != pLnk->GetObjType() &&
|
||||
dynamic_cast<const SwBaseLink*>( pLnk) != nullptr &&
|
||||
!static_cast<const SwBaseLink*>(pLnk)->IsNoDataFlag() &&
|
||||
|
||||
Reference in New Issue
Block a user