Kaydet (Commit) 455f2af8 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1426163 Improper use of negative value

Change-Id: I2c9fea13981ac9c429d55461869b22097cc1b330
Reviewed-on: https://gerrit.libreoffice.org/46604Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 228105d8
......@@ -94,10 +94,10 @@ private:
SAL_DLLPRIVATE bool ImplWriteSgaObject( const SgaObject& rObj, sal_Int32 nPos, GalleryObject* pExistentEntry );
SAL_DLLPRIVATE void ImplWrite();
SAL_DLLPRIVATE const GalleryObject* ImplGetGalleryObject( sal_Int32 nPos ) const
{ return ( nPos < sal_Int32(aObjectList.size()) ) ? aObjectList[ nPos ] : nullptr; }
{ return ( nPos >= 0 && nPos < sal_Int32(aObjectList.size()) ) ? aObjectList[nPos] : nullptr; }
const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL );
SAL_DLLPRIVATE sal_Int32 ImplGetGalleryObjectPos( const GalleryObject* pObj ) const
SAL_DLLPRIVATE sal_Int32 ImplGetGalleryObjectPos( const GalleryObject* pObj ) const
{
for ( size_t i = 0, n = aObjectList.size(); i < n; ++i )
if ( pObj == aObjectList[ i ] )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment