Skip to content

Commit

Permalink
Merge pull request microsoft#992 from Microsoft/perfWork
Browse files Browse the repository at this point in the history
use .pop() on an array instead of setting the length directly.  The latt...
  • Loading branch information
CyrusNajmabadi committed Oct 29, 2014
2 parents 32b8a0e + 782239b commit 5ce3baf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/services/syntax/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1628,13 +1628,12 @@ module TypeScript.Scanner {
var diagnostic = _tokenDiagnostics[tokenDiagnosticsLength - 1];
if (diagnostic.start() >= position) {
tokenDiagnosticsLength--;
_tokenDiagnostics.pop();
}
else {
break;
}
}

_tokenDiagnostics.length = tokenDiagnosticsLength;
}

function resetToPosition(absolutePosition: number): void {
Expand Down

0 comments on commit 5ce3baf

Please sign in to comment.