Commit e5dae4b1 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio
Browse files

Fixed LAYER_NUM usage in the specctra code.

A specctra layer is not a LAYER_NUM, so that's probably why it was difficult to use.
parent d00c83cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard )

int SPECCTRA_DB::findLayerName( const std::string& aLayerName ) const
{
    for( LAYER_NUM i=FIRST_LAYER;  i<int(layerIds.size());  ++i )
    for( int i=0;  i < int(layerIds.size());  ++i )
    {
        if( 0 == aLayerName.compare( layerIds[i] ) )
            return i;
+1 −1
Original line number Diff line number Diff line
@@ -3743,7 +3743,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
     *  or delete it.
     */
    PADSTACK* makeVia( int aCopperDiameter, int aDrillDiameter,
                       LAYER_NUM aTopLayer, LAYER_NUM aBotLayer );
                       int aTopLayer, int aBotLayer );

    /**
     * Function makeVia
+1 −1
Original line number Diff line number Diff line
@@ -1851,7 +1851,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR )
                wire->wire_type = T_protect;    // @todo, this should be configurable

                LAYER_NUM kiLayer  = track->GetLayer();
                LAYER_NUM pcbLayer = kicadLayer2pcb[kiLayer];
                int pcbLayer = kicadLayer2pcb[kiLayer];

                path = new PATH( wire );

+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ static wxPoint mapPt( const POINT& aPoint, UNIT_RES* aResolution )

TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) throw( IO_ERROR )
{
    LAYER_NUM layerNdx = findLayerName( aPath->layer_id );
    int layerNdx = findLayerName( aPath->layer_id );

    if( layerNdx == -1 )
    {