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

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


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;

Regards,
Matthias

-- 
http://final-memory.org/




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