On Tue, Oct 30, 2018 at 12:15 PM Huw Davies huw@codeweavers.com wrote:
There are too many variables tracking size in this block which makes the whole thing confusing. You should just need array_size, cur and n. If you really need a boolean to break out of the outer loop then name that variable 'done' and change the for (;;) -> while (!done)
Huw.
Yeah I can cull some variables. My reasoning for why I chose curblock_size was to make it more flexible so that the "rate of expansion" can be easily adjusted, should it be needed. If I make it like array_size *= 2, then I'll have to hardcode for this when calculating rem (or cur), unlike now where changing the rate of expansion can be easily done by adjusting just the curblock_size = array_size line (to literally any number, except zero).
I'll change it though, no problem.