diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-02-03 16:48:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-21 16:35:11 +0000 |
commit | 4c7775247fbbf38cd397fd7649bf10810f27a0b4 (patch) | |
tree | 212393c600add39cc095ab2975a94b16faecf177 | |
parent | 3f9500481902f11349ce8fee523824abe445cc04 (diff) |
tdf#104447 sw: make lcl_DebugMarks output more readable, pos. at the start
(cherry picked from commit f6596a35c2d9a8c365bb78e1256a2def57ee1a36)
The pass-by-value is also fixed here which is a surprisingly expensive
performance regression.
Change-Id: If9c151faefa3d109af2df7933a275c667880fb75
Reviewed-on: https://gerrit.libreoffice.org/35492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index f75dd0e2c5de..1604d7ccf35c 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -288,28 +288,28 @@ namespace [&rName] (IDocumentMarkAccess::pMark_t const& rpMark) { return rpMark->GetName() == rName; } ); } - void lcl_DebugMarks(IDocumentMarkAccess::container_t vMarks) + void lcl_DebugMarks(IDocumentMarkAccess::container_t const& rMarks) { #if OSL_DEBUG_LEVEL > 0 - SAL_INFO("sw.core", vMarks.size() << " Marks"); - for(IDocumentMarkAccess::iterator_t ppMark = vMarks.begin(); - ppMark != vMarks.end(); - ppMark++) + SAL_INFO("sw.core", rMarks.size() << " Marks"); + for (IDocumentMarkAccess::const_iterator_t ppMark = rMarks.begin(); + ppMark != rMarks.end(); + ++ppMark) { IMark* pMark = ppMark->get(); const SwPosition* const pStPos = &pMark->GetMarkStart(); const SwPosition* const pEndPos = &pMark->GetMarkEnd(); SAL_INFO("sw.core", - typeid(*pMark).name() << " " << - pMark->GetName() << " " << pStPos->nNode.GetIndex() << "," << pStPos->nContent.GetIndex() << " " << pEndPos->nNode.GetIndex() << "," << - pEndPos->nContent.GetIndex()); + pEndPos->nContent.GetIndex() << " " << + typeid(*pMark).name() << " " << + pMark->GetName()); } #endif - assert(std::is_sorted(vMarks.begin(), vMarks.end(), lcl_MarkOrderingByStart)); - (void) vMarks; + assert(std::is_sorted(rMarks.begin(), rMarks.end(), lcl_MarkOrderingByStart)); + (void) rMarks; }; } |