Tried once again to make a labeled continue work. It doesn't.
I thought maybe this was fixed, because in early betas the "with" statement didn't work, but it does now. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4612 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -103,7 +103,10 @@ public class DisplayUtil
|
|||||||
// keep track of area that doesn't generate new possibles
|
// keep track of area that doesn't generate new possibles
|
||||||
var dead :Array = new Array();
|
var dead :Array = new Array();
|
||||||
|
|
||||||
while (possibles.length > 0) {
|
// Note: labeled breaks and continues are supposed to be legal,
|
||||||
|
// but they throw wacky runtime exceptions for me. So instead
|
||||||
|
// I'm throwing a boolean and using that to continue the while
|
||||||
|
/* CHECKPOSSIBLES: */ while (possibles.length > 0) {
|
||||||
try {
|
try {
|
||||||
var p :Point = (possibles.shift() as Point);
|
var p :Point = (possibles.shift() as Point);
|
||||||
r.x = p.x;
|
r.x = p.x;
|
||||||
@@ -117,6 +120,7 @@ public class DisplayUtil
|
|||||||
// and not over a dead area
|
// and not over a dead area
|
||||||
for each (var deadRect :Rectangle in dead) {
|
for each (var deadRect :Rectangle in dead) {
|
||||||
if (deadRect.intersects(r)) {
|
if (deadRect.intersects(r)) {
|
||||||
|
//continue CHECKPOSSIBLES;
|
||||||
throw true; // continue outer loop
|
throw true; // continue outer loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,6 +144,7 @@ public class DisplayUtil
|
|||||||
|
|
||||||
// re-sort the list
|
// re-sort the list
|
||||||
possibles.sort(pointSorter);
|
possibles.sort(pointSorter);
|
||||||
|
//continue CHECKPOSSIBLES;
|
||||||
throw true; // continue outer loop
|
throw true; // continue outer loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user