Kaydet (Commit) 61535f9b authored tarafından Michael Stahl's avatar Michael Stahl

sw: speed up SwpHints::Check() by 2x

It's only necessary to compare each pair of nesting hints once.

Change-Id: I221bb0d63ffaf3d748b934788f93afe0f65ed961
üst 8ee4911d
......@@ -328,10 +328,10 @@ bool SwpHints::Check(bool bPortionsMerged) const
// 9) nesting portion check
if (pHtThis->IsNesting())
{
for ( size_t j = 0; j < Count(); ++j )
for (size_t j = 0; j < i; ++j)
{
SwTextAttr const * const pOther( m_HintsByStart[j] );
if ( pOther->IsNesting() && (i != j) )
if (pOther->IsNesting())
{
SwComparePosition cmp = ComparePosition(
pHtThis->GetStart(), *pHtThis->End(),
......
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