[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/kompare/libdiff2
From: Laurent Montel <montel () kde ! org>
Date: 2011-02-04 20:59:14
Message-ID: 20110204205915.00788AC8C7 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1218826 by mlaurent:
Make it compile with strict iterator
M +6 -6 diffmodel.cpp
--- trunk/KDE/kdesdk/kompare/libdiff2/diffmodel.cpp #1218825:1218826
@@ -436,7 +436,7 @@
// Compute line numbers in source and destination to which the for diff line \
sequences (will be created later) int sourceLineNumber;
int destinationLineNumber;
- if (iterBegin == m_differences.constEnd()) { // All existing diffs are after the \
change + if (iterBegin == m_differences.end()) { // All existing diffs are after \
the change destinationLineNumber = editLineNumber;
if (!m_differences.isEmpty()) {
sourceLineNumber = m_differences.last()->sourceLineEnd() - \
(m_differences.last()->trackingDestinationLineEnd() - editLineNumber); @@ -519,15 \
+519,15 @@
int currentSourceListLine = 0;
int currentDestinationListLine = 0;
- MarkerListConstIterator sourceMarkerIter = sourceMarkers.begin();
- MarkerListConstIterator destinationMarkerIter = destinationMarkers.begin();
+ MarkerListConstIterator sourceMarkerIter = sourceMarkers.constBegin();
+ MarkerListConstIterator destinationMarkerIter = destinationMarkers.constBegin();
const int terminatorLineNumber = sourceLines.size() + destinationLines.size() + 1; \
// A virtual offset for simpler computation - stands for infinity
// Process marker lists, converting pairs of Start-End markers into differences.
// Marker in source list only stands for deletion, in source and destination lists \
- for change, in destination list only - for insertion.
- while(sourceMarkerIter != sourceMarkers.end() || destinationMarkerIter != \
destinationMarkers.end()) {
- int nextSourceListLine = sourceMarkerIter != sourceMarkers.end() ? \
(*sourceMarkerIter)->offset() : terminatorLineNumber;
- int nextDestinationListLine = destinationMarkerIter != destinationMarkers.end() ? \
(*destinationMarkerIter)->offset() : terminatorLineNumber; + while(sourceMarkerIter \
!= sourceMarkers.constEnd() || destinationMarkerIter != \
destinationMarkers.constEnd()) { + int nextSourceListLine = sourceMarkerIter != \
sourceMarkers.constEnd() ? (*sourceMarkerIter)->offset() : terminatorLineNumber; \
+ int nextDestinationListLine = destinationMarkerIter != \
destinationMarkers.constEnd() ? (*destinationMarkerIter)->offset() : \
terminatorLineNumber;
// Advance to the nearest marker
int linesToSkip = qMin(nextDestinationListLine - currentDestinationListLine, \
nextSourceListLine - currentSourceListLine);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic