Commit d4bfa450 authored by Vladimir Uryvaev's avatar Vladimir Uryvaev

Debug bug:) fix. Wayne found it.

parent 1ef58372
...@@ -25,26 +25,34 @@ typedef LENGTH< double, 1 > LENGTH_PCB_DBL; ...@@ -25,26 +25,34 @@ typedef LENGTH< double, 1 > LENGTH_PCB_DBL;
#define TO_LEGACY_LU_DBL( x ) \ #define TO_LEGACY_LU_DBL( x ) \
( (double) ( LENGTH_PCB_DBL( x ) / PCB_LEGACY_UNIT( LENGTH_PCB_DBL ) ) ) ( (double) ( LENGTH_PCB_DBL( x ) / PCB_LEGACY_UNIT( LENGTH_PCB_DBL ) ) )
static LENGTH_PCB from_legacy_lu( int x ) #ifdef __GNUC__
#define NOT_USED __attribute__ ((unused))
#else
#define NOT_USED
#endif
static LENGTH_PCB NOT_USED from_legacy_lu( int x )
{ {
return x * PCB_LEGACY_UNIT( LENGTH_PCB ); return x * PCB_LEGACY_UNIT( LENGTH_PCB );
} }
static LENGTH_PCB from_legacy_lu( long x ) static LENGTH_PCB NOT_USED from_legacy_lu( long x )
{ {
return x * PCB_LEGACY_UNIT( LENGTH_PCB ); return x * PCB_LEGACY_UNIT( LENGTH_PCB );
} }
static LENGTH_PCB from_legacy_lu( double x ) static LENGTH_PCB NOT_USED from_legacy_lu( double x )
{ {
return LENGTH_PCB( x * PCB_LEGACY_UNIT( LENGTH_PCB_DBL ) ); return LENGTH_PCB( x * PCB_LEGACY_UNIT( LENGTH_PCB_DBL ) );
} }
static LENGTH_PCB_DBL from_legacy_lu_dbl( double x ) static LENGTH_PCB_DBL NOT_USED from_legacy_lu_dbl( double x )
{ {
return x * LENGTH_UNITS< LENGTH_PCB_DBL >::inch() / PCB_LEGACY_INCH_SCALE; return x * LENGTH_UNITS< LENGTH_PCB_DBL >::inch() / PCB_LEGACY_INCH_SCALE;
} }
#undef NOT_USED
#define FROM_LEGACY_LU( x ) ( from_legacy_lu( x ) ) #define FROM_LEGACY_LU( x ) ( from_legacy_lu( x ) )
#define FROM_LEGACY_LU_DBL( x ) ( from_legacy_lu_dbl( x ) ) #define FROM_LEGACY_LU_DBL( x ) ( from_legacy_lu_dbl( x ) )
......
...@@ -988,7 +988,7 @@ void D_PAD::Show( int nestLevel, std::ostream& os ) ...@@ -988,7 +988,7 @@ void D_PAD::Show( int nestLevel, std::ostream& os )
" num=\"" << padname << '"' << " num=\"" << padname << '"' <<
" net=\"" << m_Netname.mb_str() << '"' << " net=\"" << m_Netname.mb_str() << '"' <<
" netcode=\"" << GetNet() << '"' << " netcode=\"" << GetNet() << '"' <<
" layerMask=\"" << layerMask << '"' << m_Pos << "/>\n"; " layerMask=\"" << layerMask << '"' << TO_LEGACY_LU_WXP( m_Pos ) << "/>\n";
// NestedSpace( nestLevel+1, os ) << m_Text.mb_str() << '\n'; // NestedSpace( nestLevel+1, os ) << m_Text.mb_str() << '\n';
......
...@@ -479,7 +479,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) ...@@ -479,7 +479,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
polygon->AppendPoint( lowerRight ); polygon->AppendPoint( lowerRight );
} }
D(printf( "m_DeltaSize: %d,%d\n", TO_LEGACY_LU( aPad->m_DeltaSize.x ), TO_LEGACY_LU( aPad->m_DeltaSize.y ) );) D(printf( "m_DeltaSize: %d,%d\n", TO_LEGACY_LU( aPad->m_DeltaSize.x() ), TO_LEGACY_LU( aPad->m_DeltaSize.y() ) );)
// this string _must_ be unique for a given physical shape // this string _must_ be unique for a given physical shape
snprintf( name, sizeof(name), "Trapz%sPad_%.6gx%.6g_%c%.6gx%c%.6g_mil", snprintf( name, sizeof(name), "Trapz%sPad_%.6gx%.6g_%c%.6gx%c%.6g_mil",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment