Changed D() macro to DBG() because of conflict with glm::D().
Added const to GetColor() and GetType() functions in WS_DRAW_ITEM.
This commit is contained in:
parent
87da6a8ad3
commit
4f0aa1c07c
|
@ -415,6 +415,6 @@ void CALLBACK tessErrorCB( GLenum errorCode )
|
|||
errorStr = gluErrorString( errorCode );
|
||||
|
||||
// DEBUG //
|
||||
D( printf( "Tess ERROR: %s\n", errorStr ); )
|
||||
DBG( printf( "Tess ERROR: %s\n", errorStr ); )
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ int VRML_MODEL_PARSER::readMaterial( FILE* file, int* LineNum )
|
|||
}
|
||||
}
|
||||
|
||||
D( printf( "ReadMaterial error: material not found\n" ) );
|
||||
DBG( printf( "ReadMaterial error: material not found\n" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ int VRML_MODEL_PARSER::readChildren( FILE* file, int* LineNum )
|
|||
}
|
||||
else
|
||||
{
|
||||
D( printf( "ReadChildren error line %d <%s> \n", *LineNum, text ) );
|
||||
DBG( printf( "ReadChildren error line %d <%s> \n", *LineNum, text ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ int VRML_MODEL_PARSER::readShape( FILE* file, int* LineNum )
|
|||
}
|
||||
else
|
||||
{
|
||||
D( printf( "ReadShape error line %d <%s> \n", *LineNum, text ) );
|
||||
DBG( printf( "ReadShape error line %d <%s> \n", *LineNum, text ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum )
|
|||
}
|
||||
else
|
||||
{
|
||||
D( printf( "ReadAppearance error line %d <%s> \n", *LineNum, text ) );
|
||||
DBG( printf( "ReadAppearance error line %d <%s> \n", *LineNum, text ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,19 +197,19 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
|
|||
if( !parseDoubleTriplet( properties[ wxT( "diffuseColor" ) ],
|
||||
material->m_DiffuseColor ) )
|
||||
{
|
||||
D( printf("diffuseColor parsing error") );
|
||||
DBG( printf("diffuseColor parsing error") );
|
||||
}
|
||||
|
||||
if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ],
|
||||
material->m_SpecularColor ) )
|
||||
{
|
||||
D( printf("specularColor parsing error") );
|
||||
DBG( printf("specularColor parsing error") );
|
||||
}
|
||||
|
||||
if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ],
|
||||
material->m_EmissiveColor ) )
|
||||
{
|
||||
D( printf("emissiveColor parsing error") );
|
||||
DBG( printf("emissiveColor parsing error") );
|
||||
}
|
||||
|
||||
wxStringTokenizer values;
|
||||
|
@ -221,7 +221,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
|
|||
}
|
||||
else
|
||||
{
|
||||
D( printf( "ambienterror" ) );
|
||||
DBG( printf( "ambienterror" ) );
|
||||
}
|
||||
|
||||
values.SetString( properties[ wxT( "shininess" ) ] );
|
||||
|
@ -232,7 +232,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
|
|||
}
|
||||
else
|
||||
{
|
||||
D( printf( "shininess error" ) );
|
||||
DBG( printf( "shininess error" ) );
|
||||
}
|
||||
|
||||
values.SetString( properties[ wxT( "transparency" ) ] );
|
||||
|
@ -243,7 +243,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
|
|||
}
|
||||
else
|
||||
{
|
||||
D( printf( "trans error") );
|
||||
DBG( printf( "trans error") );
|
||||
}
|
||||
|
||||
material->SetMaterial();
|
||||
|
@ -303,7 +303,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
|
|||
}
|
||||
}
|
||||
|
||||
D( printf( "ReadMaterial error: material not found\n" ) );
|
||||
DBG( printf( "ReadMaterial error: material not found\n" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
|
|||
tokens.GetNextToken().ToDouble( &rotation.z ) &&
|
||||
tokens.GetNextToken().ToDouble( &angle ) ) )
|
||||
{
|
||||
D( printf("rotation read error") );
|
||||
DBG( printf("rotation read error") );
|
||||
}
|
||||
|
||||
double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits *
|
||||
|
@ -407,7 +407,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
|
|||
|
||||
if( points.size() % 3 != 0 )
|
||||
{
|
||||
D( printf( "Number of points is incorrect" ) );
|
||||
DBG( printf( "Number of points is incorrect" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#define WIN_STRING_DIR_SEP wxT( "\\" )
|
||||
|
||||
#ifdef DEBUG
|
||||
#define D(x) x
|
||||
#define DBG(x) x
|
||||
#else
|
||||
#define D(x) // nothing
|
||||
#define DBG(x) // nothing
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,6 @@ protected:
|
|||
// to the parent WORKSHEET_DATAITEM item,
|
||||
// in page layout editor
|
||||
|
||||
protected:
|
||||
WS_DRAW_ITEM_BASE( WORKSHEET_DATAITEM* aParent,
|
||||
WS_DRAW_TYPE aType, EDA_COLOR_T aColor )
|
||||
{
|
||||
|
@ -53,8 +52,8 @@ public:
|
|||
virtual ~WS_DRAW_ITEM_BASE() {}
|
||||
|
||||
// Accessors:
|
||||
EDA_COLOR_T GetColor() { return m_color; }
|
||||
WS_DRAW_TYPE GetType() { return m_type; };
|
||||
EDA_COLOR_T GetColor() const { return m_color; }
|
||||
WS_DRAW_TYPE GetType() const { return m_type; };
|
||||
|
||||
WORKSHEET_DATAITEM* GetParent() { return m_parent; }
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet(
|
|||
break;
|
||||
|
||||
default:
|
||||
D( printf( "Error: Shape %d not implemented!\n",
|
||||
DBG( printf( "Error: Shape %d not implemented!\n",
|
||||
outline->GetShape() ); )
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
|
|||
{
|
||||
LAYER_NUM previous_layer = getActiveLayer();
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); )
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); )
|
||||
|
||||
// Delete the current trace
|
||||
ShowNewTrackWhenMovingCursor( m_canvas, DC, wxDefaultPosition, false );
|
||||
|
@ -215,7 +215,7 @@ void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm )
|
|||
next_track = tracksegment->Next();
|
||||
tracksegment->SetState( BUSY, false );
|
||||
|
||||
D( std::cout << __func__ << ": track " << tracksegment << " status=" \
|
||||
DBG( std::cout << __func__ << ": track " << tracksegment << " status=" \
|
||||
<< TO_UTF8( TRACK::ShowState( tracksegment->GetStatus() ) ) \
|
||||
<< std::endl; )
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
|
|||
wxArrayInt cols = m_cur_grid->GetSelectedCols();
|
||||
wxArrayInt rows = m_cur_grid->GetSelectedRows();
|
||||
|
||||
D(printf("topLeft.Count():%zd botRight:Count():%zd\n", topLeft.Count(), botRight.Count() );)
|
||||
DBG(printf("topLeft.Count():%zd botRight:Count():%zd\n", topLeft.Count(), botRight.Count() );)
|
||||
|
||||
if( topLeft.Count() && botRight.Count() )
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
|
|||
selColCount = 0;
|
||||
}
|
||||
|
||||
// D(printf("selRowStart:%d selColStart:%d selRowCount:%d selColCount:%d\n", selRowStart, selColStart, selRowCount, selColCount );)
|
||||
// DBG(printf("selRowStart:%d selColStart:%d selRowCount:%d selColCount:%d\n", selRowStart, selColStart, selRowCount, selColCount );)
|
||||
}
|
||||
|
||||
void rightClickCellPopupMenu()
|
||||
|
@ -353,7 +353,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
|
|||
break;
|
||||
|
||||
case ID_PASTE:
|
||||
D(printf( "paste\n" );)
|
||||
DBG(printf( "paste\n" );)
|
||||
// assume format came from a spreadsheet or us.
|
||||
if( wxTheClipboard->Open() )
|
||||
{
|
||||
|
@ -471,7 +471,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
|
|||
|
||||
m_cur_grid->SetGridCursor( curRow, curCol );
|
||||
}
|
||||
D(printf("%s\n", __func__);)
|
||||
DBG(printf("%s\n", __func__);)
|
||||
}
|
||||
|
||||
void onCancelButtonClick( wxCommandEvent& event )
|
||||
|
@ -522,7 +522,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
|
|||
m_cur_row = event.GetRow();
|
||||
m_cur_col = event.GetCol();
|
||||
|
||||
D(printf("change cursor(%d,%d)\n", m_cur_row, m_cur_col );)
|
||||
DBG(printf("change cursor(%d,%d)\n", m_cur_row, m_cur_col );)
|
||||
|
||||
// somebody else wants this
|
||||
event.Skip();
|
||||
|
|
|
@ -2674,7 +2674,7 @@ LAYER_NUM EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const
|
|||
case 95: kiLayer = ECO1_N; break;
|
||||
case 96: kiLayer = ECO2_N; break;
|
||||
default:
|
||||
D( printf( "unsupported eagle layer: %d\n", aEagleLayer );)
|
||||
DBG( printf( "unsupported eagle layer: %d\n", aEagleLayer );)
|
||||
kiLayer = -1; break; // some layers do not map to KiCad
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,11 +153,11 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
GetBoard()->SetHighLightNet( zone->GetNet() );
|
||||
}
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity() );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity() );
|
||||
|
||||
BuildAirWiresTargetsList( LockPoint, wxPoint( 0, 0 ), true );
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity() );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity() );
|
||||
|
||||
GetBoard()->HighLightON();
|
||||
GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() );
|
||||
|
@ -191,7 +191,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
// Create 2nd segment
|
||||
g_CurrentTrackList.PushBack( (TRACK*)g_CurrentTrackSegment->Clone() );
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
g_CurrentTrackSegment->start = g_FirstTrackSegment;
|
||||
g_FirstTrackSegment->end = g_CurrentTrackSegment;
|
||||
|
@ -199,7 +199,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
g_FirstTrackSegment->SetState( BEGIN_ONPAD | END_ONPAD, false );
|
||||
}
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
SetMsgPanel( g_CurrentTrackSegment );
|
||||
SetCurItem( g_CurrentTrackSegment, false );
|
||||
|
@ -246,11 +246,11 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
if( CanCreateNewSegment )
|
||||
{
|
||||
// Erase old track on screen
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
ShowNewTrackWhenMovingCursor( m_canvas, aDC, wxDefaultPosition, false );
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
if( g_Raccord_45_Auto )
|
||||
Add45DegreeSegment( aDC );
|
||||
|
@ -273,7 +273,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
|
||||
newTrack->start = previousTrack->end;
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
newTrack->SetStart( newTrack->GetEnd() );
|
||||
|
||||
|
@ -282,7 +282,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
if( !GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth )
|
||||
newTrack->SetWidth( GetBoard()->GetCurrentTrackWidth() );
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
// Show the new position
|
||||
ShowNewTrackWhenMovingCursor( m_canvas, aDC, wxDefaultPosition, false );
|
||||
|
@ -422,7 +422,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC )
|
|||
// Saving the coordinate of end point of the trace
|
||||
wxPoint pos = g_CurrentTrackSegment->GetEnd();
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
if( Begin_Route( aTrack, aDC ) == NULL )
|
||||
return false;
|
||||
|
@ -439,7 +439,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC )
|
|||
* }
|
||||
*/
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
|
||||
/* The track here is now chained to the list of track segments.
|
||||
|
@ -670,7 +670,7 @@ inline void DrawViaCirclesWhenEditingNewTrack( EDA_RECT* aPanelClipBox,
|
|||
void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||
bool aErase )
|
||||
{
|
||||
// D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
// DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
|
||||
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
|
||||
|
@ -764,7 +764,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
|
|||
}
|
||||
|
||||
// Redraw the new track
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
DrawTraces( aPanel, aDC, g_FirstTrackSegment, g_CurrentTrackList.GetCount(), GR_XOR );
|
||||
|
||||
if( showTrackClearanceMode >= SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS )
|
||||
|
|
|
@ -376,7 +376,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
|
|||
|
||||
if( module->GetAttributes() & MOD_VIRTUAL )
|
||||
{
|
||||
D( printf( "skipping module %s because it's virtual\n",
|
||||
DBG( printf( "skipping module %s because it's virtual\n",
|
||||
TO_UTF8( module->GetReference() ) );)
|
||||
continue;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
|
|||
}
|
||||
else
|
||||
{
|
||||
D(printf( "skipping %s because its attribute is not CMS and it has non SMD pins\n",
|
||||
DBG(printf( "skipping %s because its attribute is not CMS and it has non SMD pins\n",
|
||||
TO_UTF8(module->GetReference()) ) );
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -601,7 +601,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
|
|||
polygon->AppendPoint( lowerRight );
|
||||
}
|
||||
|
||||
D( printf( "m_DeltaSize: %d,%d\n", aPad->GetDelta().x, aPad->GetDelta().y ); )
|
||||
DBG( printf( "m_DeltaSize: %d,%d\n", aPad->GetDelta().x, aPad->GetDelta().y ); )
|
||||
|
||||
// this string _must_ be unique for a given physical shape
|
||||
snprintf( name, sizeof(name), "Trapz%sPad_%.6gx%.6g_%c%.6gx%c%.6g_um",
|
||||
|
@ -793,7 +793,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
|
|||
case S_RECT:
|
||||
case S_ARC:
|
||||
default:
|
||||
D( printf( "makeIMAGE(): unsupported shape %s\n",
|
||||
DBG( printf( "makeIMAGE(): unsupported shape %s\n",
|
||||
TO_UTF8( BOARD_ITEM::ShowShape( (STROKE_T) graphic->GetShape() ) ) ); )
|
||||
continue;
|
||||
}
|
||||
|
@ -908,7 +908,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER
|
|||
}
|
||||
else // remove graphics not on EDGE_N layer
|
||||
{
|
||||
D( items[i]->Show( 0, std::cout );)
|
||||
DBG( items[i]->Show( 0, std::cout );)
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue