Fix PCB Module Editor Help Error.

Remove a minor compil warning in shape_collisions.cpp
This commit is contained in:
jean-pierre charras 2014-09-09 18:46:12 +02:00
parent 032b7cb71b
commit fb590c7231
2 changed files with 13 additions and 7 deletions

View File

@ -61,7 +61,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aC
const VECTOR2I size = aA.GetSize(); const VECTOR2I size = aA.GetSize();
const int r = aB.GetRadius(); const int r = aB.GetRadius();
const int min_dist = aClearance + r; const int min_dist = aClearance + r;
const VECTOR2I vts[] = const VECTOR2I vts[] =
{ {
VECTOR2I( p0.x, p0.y ), VECTOR2I( p0.x, p0.y ),
@ -107,7 +107,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aC
if( !aNeedMTV ) if( !aNeedMTV )
return true; return true;
if( inside ) if( inside )
aMTV = -delta.Resize( abs( min_dist + 1 + nearest_seg_dist ) + 1 ); aMTV = -delta.Resize( abs( min_dist + 1 + nearest_seg_dist ) + 1 );
else else
@ -152,7 +152,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB,
if( !aNeedMTV || !found ) if( !aNeedMTV || !found )
return found; return found;
SHAPE_CIRCLE cmoved( aA ); SHAPE_CIRCLE cmoved( aA );
VECTOR2I f_total( 0, 0 ); VECTOR2I f_total( 0, 0 );
@ -162,7 +162,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB,
cmoved.SetCenter( cmoved.GetCenter() + f ); cmoved.SetCenter( cmoved.GetCenter() + f );
f_total += f; f_total += f;
} }
aMTV = f_total; aMTV = f_total;
return found; return found;
} }
@ -246,13 +246,13 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeed
case SH_RECT: case SH_RECT:
switch( aB->Type() ) switch( aB->Type() )
{ {
case SH_CIRCLE: case SH_CIRCLE:
return CollCase<SHAPE_RECT, SHAPE_CIRCLE>( aA, aB, aClearance, aNeedMTV, aMTV ); return CollCase<SHAPE_RECT, SHAPE_CIRCLE>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN: case SH_LINE_CHAIN:
return CollCase<SHAPE_RECT, SHAPE_LINE_CHAIN>( aA, aB, aClearance, aNeedMTV, aMTV ); return CollCase<SHAPE_RECT, SHAPE_LINE_CHAIN>( aA, aB, aClearance, aNeedMTV, aMTV );
case SH_SEGMENT: case SH_SEGMENT:
return CollCase<SHAPE_RECT, SHAPE_SEGMENT>( aA, aB, aClearance, aNeedMTV, aMTV ); return CollCase<SHAPE_RECT, SHAPE_SEGMENT>( aA, aB, aClearance, aNeedMTV, aMTV );
default: default:
@ -320,6 +320,7 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeed
} }
bool unsupported_collision = true; bool unsupported_collision = true;
(void) unsupported_collision; // make gcc quiet
assert( unsupported_collision == false ); assert( unsupported_collision == false );

View File

@ -138,6 +138,11 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU( ID_PCB_PAD_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_PCB_PAD_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions )
EVT_MENU( ID_PCB_USER_GRID_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_PCB_USER_GRID_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions )
// Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Menu 3D Frame // Menu 3D Frame
EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, FOOTPRINT_EDIT_FRAME::Show3D_Frame ) EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, FOOTPRINT_EDIT_FRAME::Show3D_Frame )