Skip to content

Commit

Permalink
Remove while true guard
Browse files Browse the repository at this point in the history
  • Loading branch information
JsonFreeman committed Oct 29, 2014
1 parent 7eeac2b commit 32b8a0e
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5469,31 +5469,29 @@ module ts {
Debug.assert(!result.length);
for (var i = 0; i < signatures.length; i++) {
var signature = signatures[i];
if (true) {
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
if (lastParent && parent === lastParent) {
pos++;
}
else {
lastParent = parent;
pos = cutoffPos;
}
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
if (lastParent && parent === lastParent) {
pos++;
}
else {
// current declaration belongs to a different symbol
// set cutoffPos so re-orderings in the future won't change result set from 0 to cutoffPos
pos = cutoffPos = result.length;
lastParent = parent;
pos = cutoffPos;
}
lastSymbol = symbol;
}
else {
// current declaration belongs to a different symbol
// set cutoffPos so re-orderings in the future won't change result set from 0 to cutoffPos
pos = cutoffPos = result.length;
lastParent = parent;
}
lastSymbol = symbol;

for (var j = result.length; j > pos; j--) {
result[j] = result[j - 1];
}
result[pos] = signature;
for (var j = result.length; j > pos; j--) {
result[j] = result[j - 1];
}
result[pos] = signature;
}
}
}
Expand Down

0 comments on commit 32b8a0e

Please sign in to comment.