sw/source/core/txtnode/thints.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit a950caa029b6afcf385fbbdfbf8d2d6367b7e0a0 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon Apr 7 19:41:01 2025 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Mon Apr 7 21:40:56 2025 +0200 tdf#64991 inline some calls inside a hot loop Change-Id: I04cfb8edd761e26f5093668e4acd31204e7906b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 5cb27e549181..c74a17563efd 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -652,11 +652,11 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint, if ( !bNoLengthAttribute ) // nothing to do for no length attributes { - for ( size_t i = 0; i < Count(); ++i ) + for ( size_t i = 0, nCnt = m_HintsByStart.size(); i < nCnt; ++i ) { // we're modifying stuff here which affects the sorting, and we // don't want it changing underneath us - SwTextAttr* pOther = GetWithoutResorting(i); + SwTextAttr* pOther = m_HintsByStart[i]; if ( RES_TXTATR_CHARFMT != pOther->Which() && RES_TXTATR_AUTOFMT != pOther->Which() ) @@ -725,9 +725,9 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint, if ( !bNoLengthAttribute ) // nothing to do for no length attributes { - for ( size_t i = 0; i < Count(); ++i ) + for ( size_t i = 0, nCnt = m_HintsByStart.size(); i < nCnt; ++i ) { - const SwTextAttr* pOther = Get(i); + const SwTextAttr* pOther = m_HintsByStart[i]; if ( RES_TXTATR_CHARFMT != pOther->Which() && RES_TXTATR_AUTOFMT != pOther->Which() ) @@ -759,10 +759,10 @@ void SwpHints::BuildPortions( SwTextNode& rNode, SwTextAttr& rNewHint, aInsDelHints.clear(); // Get all hints that are in [nPorStart, nPorEnd[: - for ( size_t i = 0; i < Count(); ++i ) + for ( size_t i = 0, nCnt = m_HintsByStart.size(); i < nCnt; ++i ) { // we get called from TryInsertHint, which changes ordering - SwTextAttr *pOther = GetWithoutResorting(i); + SwTextAttr *pOther = m_HintsByStart[i]; if ( RES_TXTATR_CHARFMT != pOther->Which() && RES_TXTATR_AUTOFMT != pOther->Which() )