sc/source/core/data/column4.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit 97649f5d39107c6354fc9b4e4eba223b0a1c1e41 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Aug 24 10:53:40 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 24 20:09:40 2024 +0200 cid#1555386 COPY_INSTEAD_OF_MOVE Change-Id: Ic8aff9bb5e2ce7a717460fc167dfd23b9401855b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172350 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 81d95895967f..3b322c73c23f 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -866,8 +866,7 @@ void ScColumn::GetNotesInRange(SCROW nStartRow, SCROW nEndRow, std::vector<sc::NoteEntry>& rNotes ) const { std::pair<sc::CellNoteStoreType::const_iterator,size_t> aPos = maCellNotes.position(nStartRow); - sc::CellNoteStoreType::const_iterator it = aPos.first; - if (it == maCellNotes.end()) + if (aPos.first == maCellNotes.end()) // Invalid row number. return; @@ -875,7 +874,7 @@ void ScColumn::GetNotesInRange(SCROW nStartRow, SCROW nEndRow, maCellNotes.position(nEndRow); sc::CellNoteStoreType::const_iterator itEnd = aEndPos.first; - std::for_each(it, ++itEnd, NoteEntryCollector(rNotes, nTab, nCol, nStartRow, nEndRow)); + std::for_each(aPos.first, ++itEnd, NoteEntryCollector(rNotes, nTab, nCol, nStartRow, nEndRow)); } bool ScColumn::HasCellNote(SCROW nStartRow, SCROW nEndRow) const
