> > 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.
Sure, I did it this way so I could avoid changing of the header file and rebuilding of the whole source. The patch is definitely not meant to be applied as is.
|