Closed esidegallery closed 2 years ago
Thanks! Can you make a tweak?
I try to avoid calling push()
on arrays because it has a ...rest
argument, which allocates a temporary array that eventually needs garbage collection. I would like to keep this code in the form: indices[/* some value here */] = i;
, if at all possible.
Maybe with var currentIndex:int = 0;
before the loop. Then, like this:
indices[currentIndex] = i;
currentIndex++;
Done. Actually I did indices[currentIndex++] = i;
(which may not be in your coding convention 🫣)
Thanks for the info on push(). I shall avoid it henceforth!
which may not be in your coding convention
Yeah, you're right. I try to be extra careful with the ++
operator. I recall that there's something tricky about when the increment gets applied if there are certain other things happening on the same line. So if I use ++
, I always put it on its own line. It's fine. I'll merge and fix it.
The error occurs when fixed columns are skipped.