refactor(core): _reset() remove nextRecord (#38752)
The nextRecord is not neccessary, so remove it and use record._nextMoved to iterate PR Close #38752
This commit is contained in:
parent
0ae00bb1f7
commit
85951a0465
@ -236,7 +236,6 @@ export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChan
|
|||||||
_reset() {
|
_reset() {
|
||||||
if (this.isDirty) {
|
if (this.isDirty) {
|
||||||
let record: IterableChangeRecord_<V>|null;
|
let record: IterableChangeRecord_<V>|null;
|
||||||
let nextRecord: IterableChangeRecord_<V>|null;
|
|
||||||
|
|
||||||
for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
|
for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
|
||||||
record._nextPrevious = record._next;
|
record._nextPrevious = record._next;
|
||||||
@ -247,9 +246,8 @@ export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChan
|
|||||||
}
|
}
|
||||||
this._additionsHead = this._additionsTail = null;
|
this._additionsHead = this._additionsTail = null;
|
||||||
|
|
||||||
for (record = this._movesHead; record !== null; record = nextRecord) {
|
for (record = this._movesHead; record !== null; record = record._nextMoved) {
|
||||||
record.previousIndex = record.currentIndex;
|
record.previousIndex = record.currentIndex;
|
||||||
nextRecord = record._nextMoved;
|
|
||||||
}
|
}
|
||||||
this._movesHead = this._movesTail = null;
|
this._movesHead = this._movesTail = null;
|
||||||
this._removalsHead = this._removalsTail = null;
|
this._removalsHead = this._removalsTail = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user