Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors to runtime that can be caught at compile time. Replacing it with a generic C++11 constexpr allows for typecasting, comparison and compile time error checking.
This commit is contained in:
@@ -672,7 +672,7 @@ void PlotLayerOutlines( BOARD* aBoard, PLOTTER* aPlotter,
|
||||
|
||||
SHAPE_POLY_SET outlines;
|
||||
|
||||
for( LSEQ seq = aLayerMask.Seq( plot_seq, DIM( plot_seq ) ); seq; ++seq )
|
||||
for( LSEQ seq = aLayerMask.Seq( plot_seq, arrayDim( plot_seq ) ); seq; ++seq )
|
||||
{
|
||||
PCB_LAYER_ID layer = *seq;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user