Bug 1562386 Comment 14 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I've just pushed a couple of changes which seem to pass my manual tests.

The helper tests I have written can be found [here](https://github.com/o0Ignition0o/nwsortindexestester)

I tried to use memcmp for the linux version, but there's probably something I'm not groking wrt unsigned char arrays so I couldn't manage. I would love to figure it out though ^^.

I'm not experienced enough to know if there's any caveat I'm missing, there's for example probably something wrong with me working with std::max(prefixLengths[a], prefixLengths[b]) if both prefixes start the same, but one is shorter than the other (it seems to me though that both have been initialized with zeroes, so it could be fine in the end).

Thank you in advance for your time and your feedbacks :)
I've just pushed a couple of changes which seem to pass my manual tests.

The helper tests I have written can be found [here](https://github.com/o0Ignition0o/nwsortindexestester)

I tried to use memcmp for the linux version, but there's probably something I'm not groking wrt unsigned char arrays so I couldn't manage. I would love to figure it out though ^^.

I'm not experienced enough to know if there's any caveat I'm missing, there's for example probably something wrong with me working with std::max(prefixLengths[a], prefixLengths[b]) if both prefixes start the same, but one is shorter than the other (it seems to me though that both have been initialized with zeroes, so it could be fine in the end).

Thank you in advance for your time and your feedbacks :)

EDIT: After a bit of digging / reading I've just pushed a version using a string instead of an unsigned char array, which allows me to compare them easily (and which is probably less error prone). I hope it helps ^^

Back to Bug 1562386 Comment 14