> I am attaching a proof-of-concept > patch, which abuses the m_bits field as a secondary key during the sorting phase to > achieve a stable sort with a generic Quicksort.
I'm not a mamedev, so feel free to ignore me, but I don't think it's a good idea to re-use the m_bits field for a different purpose. Could another field be added to to the node structure for the purposes of secondary sorting?
If the only option is to re-use the field for a different purpose, then it should be thoroughly documented as a convenience hack/abuse in the places where it's being used for another purpose so that future people reading the code understand what's going on.
GroovyMAME support forum on BYOAC
|