kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #13624
Re: Damned the 'undefined global constructor order'
On 06/09/2014 03:42 PM, Dick Hollenbeck wrote:
>
> Attached are two that work using the "set()" function.
>
>
> As a third choice:
>
> You could also create a new constructor that actually takes an int64_t bitmap, and use
>
> GetLayerMask() to build it.
>
> However I would rename GetLayerMask() to something more concise:
>From previous experience I know that the inline function, here called LMSK() would have
be called via the static constructor. If this is changed to a MACRO, then the
pre-processor will create the int64_t, and you only have to call the one function, the
constructor. Not the two calls to the LMSK().
IOW, the compiler cannot pre-process even *inline functions* when they are part of a
static constructor. It can however handle macros.
>
>
> const LAYER_SET LAYER_SET::IMPORTANT_SET = LMSK( LAYER_CU_FRONT ) | LMSK( LAYER_CU_BACK );
>
>
> So there, now you have 3 choices. This, plus the attached.
>
>
> Dick
>
>
> P.S. I sort of LAYER_SET better than LAYER_MSK as a type name.
>
>
>
>
Follow ups
References