Kaydet (Commit) 39bbfa61 authored tarafından Arkadiy Illarionov's avatar Arkadiy Illarionov Kaydeden (comit) Noel Grandin

Remove redundant comparisons, copy properties unconditionally

e06afb0c follow-up

Change-Id: Ic4449c9424c622aeabbf5be49826d68d95dd93eb
Reviewed-on: https://gerrit.libreoffice.org/62195
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2995a95d
......@@ -1380,28 +1380,9 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
{
sal_Int32 nProps = 0;
sal_Int32 nCount = rProperties.getLength();
for ( sal_Int32 n = 0; n < nCount; ++n )
for ( sal_Int32 n = 0; n < nCount; ++n, ++nProps )
{
const OUString & rName = rProperties[ n ].Name;
std::vector< OUString >::const_iterator end
= m_aFailedPropNames.end();
auto it = std::find(m_aFailedPropNames.cbegin(), end, rName);
if ( it != end )
{
// the failed property in cache is the same as the requested one,
// so add it to the requested properties list
aProperties[ nProps ] = rProperties[ n ];
nProps++;
}
// XXX something strange happens here: identical code for different conditions
if ( it == end )
{
aProperties[ nProps ] = rProperties[ n ];
nProps++;
}
aProperties[ nProps ] = rProperties[ n ];
}
aProperties.realloc( nProps );
......
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