cleanup BufferStringIterator

This commit is contained in:
Jörg Breitbart
2018-09-14 13:15:35 +02:00
parent 9ce2894353
commit 9514bfd31c
+8 -7
View File
@@ -405,18 +405,19 @@ export class Marker extends EventEmitter implements IMarker {
}
export class BufferStringIterator implements IBufferStringIterator {
private _start: number;
private _end: number;
private _current: number;
constructor (private _buffer: IBuffer, private _trimRight: boolean, startIndex?: number, endIndex?: number) {
this._start = startIndex || 0;
this._end = endIndex || this._buffer.lines.length;
this._current = this._start;
constructor (
private _buffer: IBuffer,
private _trimRight: boolean,
private _startIndex: number = 0,
private _endIndex: number = _buffer.lines.length)
{
this._current = this._startIndex;
}
public hasNext(): boolean {
return this._current < this._end;
return this._current < this._endIndex;
}
public next(): IBufferStringIteratorResult {