Re: [hatari-devel] order change in "machine type" enum

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 08/06/2016 18:29, Matthias Arndt a écrit :
Am 08.06.2016 um 00:24 schrieb Nicolas Pomarède:
Hello

<...>
I think we should use this enum instead (add new values at the end) :

typedef enum
{
   MACHINE_ST,
   MACHINE_STE,
   MACHINE_TT,
   MACHINE_FALCON,
   MACHINE_MEGA_STE,
   MACHINE_MEGA_ST
} MACHINETYPE;


Nicolas


A very personal opinion is to always assign fix values if those matetr
as in this case of stored configuration, e.q.


typedef enum
{
   MACHINE_ST = 0,
   MACHINE_STE = 1,
   MACHINE_TT = 2,
   MACHINE_FALCON = 3,
   MACHINE_MEGA_STE = 4,
   MACHINE_MEGA_ST = 5
} MACHINETYPE;


I think lines were re-ordered for logical / aesthetic / chronological reasons, in that case having fixed values would seem in the wrong order too when looking at the code :)




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/