Skip to content

Commit 19213cb

Browse files
authored
Merge pull request #206 from MaxKellermann/gpxlistiterator-fix-primer
GpxListIterator: fix primer nodes capturing stale list head
2 parents 6d5269c + 922abd0 commit 19213cb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

aat-lib/src/main/java/ch/bailu/aat_lib/gpx/GpxListIterator.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ import ch.bailu.aat_lib.gpx.segmented_list.SegmentNode
66

77
class GpxListIterator(private val track: GpxList) {
88
private inner class PointPrimerNode : GpxPointFirstNode(GpxPoint.NULL, GpxAttributesNull.NULL) {
9-
override var next = track.pointList.first
9+
override var next: Node?
10+
get() = track.pointList.first
11+
set(_) {}
1012
}
1113

1214
private inner class SegmentPrimerNode : GpxSegmentNode(PointPrimerNode()) {
13-
override var next = track.segmentList.first
15+
override var next: Node?
16+
get() = track.segmentList.first
17+
set(_) {}
1418
}
1519

1620
private var point: GpxPointNode = PointPrimerNode()

0 commit comments

Comments
 (0)