Minor build and compiler warning fixes.

* Fix build errors for ambiguous wxDialog constructor using gcc 3.4.5 on
  MinGW/MSYS.
* Fix compiler warnings in VRML export.
This commit is contained in:
Wayne Stambaugh 2010-08-23 13:30:51 -04:00
parent 492c75bd90
commit 80bc0ad65a
4 changed files with 25 additions and 26 deletions

View File

@ -19,7 +19,7 @@
#include "dialog_copper_zones.h"
wxString dialog_copper_zone::m_netNameShowFilter("*"); /* the filter to show nets (default * "*").
wxString dialog_copper_zone::m_netNameShowFilter( wxT( "*" ) ); /* the filter to show nets (default * "*").
* static to keep this pattern for an entire pcbnew session
*/

View File

@ -75,7 +75,7 @@ END_EVENT_TABLE()
DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
DIMENSION* Dimension, wxDC* DC
) :
wxDialog( parent, -1, _( "Dimension properties" ) )
wxDialog( parent, -1, wxString( _( "Dimension properties" ) ) )
{
wxButton* Button;
@ -166,7 +166,8 @@ void DIMENSION_EDITOR_DIALOG::OnOkClick( wxCommandEvent& event )
int maxthickness = Clamp_Text_PenSize( width, CurrentDimension->m_Text->m_Size );
if( width > maxthickness )
{
DisplayError(NULL, _("The text thickness is too large for the text size. It will be clamped"));
DisplayError( NULL,
_( "The text thickness is too large for the text size. It will be clamped") );
width = maxthickness;
}
CurrentDimension->m_Text->m_Width = CurrentDimension->m_Width = width ;

View File

@ -926,17 +926,17 @@ static void export_vrml_pad( BOARD* pcb, D_PAD* pad ) /*{{{*/
{
int coord[8] =
{
-pad_w - pad_dy, +pad_h + pad_dx,
-pad_w + pad_dy, -pad_h - pad_dx,
+pad_w - pad_dy, +pad_h - pad_dx,
+pad_w + pad_dy, -pad_h + pad_dx,
wxRound(-pad_w - pad_dy), wxRound(+pad_h + pad_dx),
wxRound(-pad_w + pad_dy), wxRound(-pad_h - pad_dx),
wxRound(+pad_w - pad_dy), wxRound(+pad_h - pad_dx),
wxRound(+pad_w + pad_dy), wxRound(-pad_h + pad_dx),
};
for( int i = 0; i < 4; i++ )
{
RotatePoint( &coord[i * 2], &coord[i * 2 + 1], pad->m_Orient );
coord[i * 2] += pad_x;
coord[i * 2 + 1] += pad_y;
coord[i * 2] += wxRound( pad_x );
coord[i * 2 + 1] += wxRound( pad_y );
}
bag_flat_quad( layer, coord[0], coord[1],
@ -1054,7 +1054,7 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
* for footprints that are flipped
* When flipped, axis rotation is the horizontal axis (X axis)
*/
int rotx = vrmlm->m_MatRotation.x;
int rotx = wxRound( vrmlm->m_MatRotation.x );
if ( isFlipped )
rotx += 1800;

View File

@ -42,9 +42,8 @@ private:
WinEDA_ValueCtrl* m_MireSizeCtrl;
wxRadioBox* m_MireShape;
public: TARGET_PROPERTIES_DIALOG_EDITOR( WinEDA_PcbFrame* parent,
MIREPCB* Mire,
wxDC* DC );
public:
TARGET_PROPERTIES_DIALOG_EDITOR( WinEDA_PcbFrame* parent, MIREPCB* Mire, wxDC* DC );
~TARGET_PROPERTIES_DIALOG_EDITOR() { }
private:
@ -73,7 +72,7 @@ void WinEDA_PcbFrame::InstallMireOptionsFrame( MIREPCB* MirePcb, wxDC* DC )
TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(
WinEDA_PcbFrame* parent,
MIREPCB* Mire, wxDC* DC ) :
wxDialog( parent, wxID_ANY, _( "Target Properties" ) )
wxDialog( parent, wxID_ANY, wxString( _( "Target Properties" ) ) )
{
wxString number;
wxButton* Button;
@ -124,8 +123,7 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(
}
void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& WXUNUSED(
event ) )
void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& WXUNUSED( event ) )
{
EndModal( -1 );
}