MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

jmak
MAME Fan
Reged: 06/16/12
Posts: 7
Send PM
Re: bug: chdman output depends on system qsort() implementation
06/17/12 07:44 PM


> > 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.







Entire thread
Subject Posted by Posted on
* bug: chdman output depends on system qsort() implementation jmak 06/16/12 12:55 PM
. * Re: bug: chdman output depends on system qsort() implementation R. Belmont  06/16/12 03:56 PM
. * Re: bug: chdman output depends on system qsort() implementation krick  06/16/12 04:16 PM
. * Re: bug: chdman output depends on system qsort() implementation R. Belmont  06/16/12 05:50 PM
. * Re: bug: chdman output depends on system qsort() implementation krick  06/16/12 06:28 PM
. * Re: bug: chdman output depends on system qsort() implementation R. Belmont  06/16/12 06:39 PM
. * Re: bug: chdman output depends on system qsort() implementation italieAdministrator  06/16/12 08:38 PM
. * Re: bug: chdman output depends on system qsort() implementation jmak  06/16/12 08:22 PM
. * Re: bug: chdman output depends on system qsort() implementation krick  06/17/12 07:38 PM
. * Re: bug: chdman output depends on system qsort() implementation jmak  06/17/12 07:44 PM
. * Re: bug: chdman output depends on system qsort() implementation R. Belmont  06/17/12 10:13 PM
. * Re: bug: chdman output depends on system qsort() implementation AaronGiles  06/17/12 11:37 PM
. * Re: bug: chdman output depends on system qsort() implementation krick  06/18/12 04:08 AM
. * Re: bug: chdman output depends on system qsort() implementation R. Belmont  06/16/12 10:13 PM
. * Re: bug: chdman output depends on system qsort() implementation jmak  06/17/12 06:47 PM
. * Re: bug: chdman output depends on system qsort() implementation jmak  06/17/12 06:58 PM
. * Re: bug: chdman output depends on system qsort() implementation R. Belmont  06/17/12 10:00 PM
. * Re: bug: chdman output depends on system qsort() implementation jmak  06/19/12 09:30 PM
. * Re: bug: chdman output depends on system qsort() implementation AaronGiles  06/17/12 02:09 AM
. * Re: bug: chdman output depends on system qsort() implementation TafoidAdministrator  06/16/12 09:06 PM
. * Re: bug: chdman output depends on system qsort() implementation krick  06/16/12 08:10 PM
. * Re: bug: chdman output depends on system qsort() implementation jmak  06/16/12 08:33 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 522 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2164