tdf#125688, special-case empty return
in FastAttributeList::getUnknownAttributes, shaves 5% off load time Change-Id: I5acac243d7af0c6fb44cbc15832f9d322fa6c7f4 Reviewed-on: https://gerrit.libreoffice.org/81819 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
498a8d0bb6
commit
01a8d79fd7
@ -234,7 +234,10 @@ OUString FastAttributeList::getOptionalValue( ::sal_Int32 Token )
|
|||||||
}
|
}
|
||||||
Sequence< Attribute > FastAttributeList::getUnknownAttributes( )
|
Sequence< Attribute > FastAttributeList::getUnknownAttributes( )
|
||||||
{
|
{
|
||||||
Sequence< Attribute > aSeq( maUnknownAttributes.size() );
|
auto nSize = maUnknownAttributes.size();
|
||||||
|
if (nSize == 0)
|
||||||
|
return {};
|
||||||
|
Sequence< Attribute > aSeq( nSize );
|
||||||
Attribute* pAttr = aSeq.getArray();
|
Attribute* pAttr = aSeq.getArray();
|
||||||
for( const auto& rAttr : maUnknownAttributes )
|
for( const auto& rAttr : maUnknownAttributes )
|
||||||
rAttr.FillAttribute( pAttr++ );
|
rAttr.FillAttribute( pAttr++ );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user