← Back to team overview

kicad-developers team mailing list archive

Re: Function prototypes

 

On Thu, Oct 31, 2013 at 11:24:39PM +0100, Maciej Suminski wrote:
> Regarding LAYER_NUMs, if all the code uses LAYER_NUMs, then I do not see a
> point in changing that in the contributed part. Again, if you have ready
> patches and main developers agree, please go ahead. If you do not want to
> spend time on that, then I will take care of introducing the changes.

The reason is another... in my branch I put further the work done on the
LAYER_NUM/LAYER_MSK types; in fact they are not simple ints like in the
main branch but enum (the idea would maybe to promote eventually to
class, someday... look in the list archives). I have some operator
define too, on them (like booleans for LAYER_MSK).

Simply you can't assign an int to an enum without a cast; I call it type
safety, other people there think that's a nuisance and that part was
rejected. OTOH I found a couple of mismatches (like a number assigned to
a mask and vice-versa) that couldn't have been found having everything
as an int around, so I still try to keep maintained the subdivision.

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References