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:
Seth Hillbrand
2019-01-06 08:43:12 -08:00
parent cec97ebfa6
commit 1e5ba6f1b1
49 changed files with 116 additions and 116 deletions
+1 -1
View File
@@ -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;