On 1/24/2019 12:34 PM, Derrick Stolee wrote:
On 1/23/2019 4:00 PM, Jonathan Tan wrote:
Indeed, the sorting of pack_info is moved to after get_sorted_entries().
Also, pack_perm[old number] = new number, as expected.

Thanks for chiming in with all the detail on the use of 'perm'. This is the most confusing part of this code path.

I think a comment explaining why the perm is needed would be helpful -
something explaining that the entries were generated using the old pack
numbers, so we need this mapping to be able to write them using the new
numbers.

I can put this comment in the struct definition. Is that the right place for it?

I mistakenly thought the pack_perm array was placed into the pack_list struct. I'll put the comment right before we populate the contents of the array.

Thanks,
-Stolee

Reply via email to