Fix a few compil warnings (not used vars, shadowed local vars)
This commit is contained in:
parent
96e55de90d
commit
a4658ab6be
|
@ -638,8 +638,8 @@ bool SGFACESET::WriteCache( std::ofstream& aFile, SGNODE* parentNode )
|
||||||
if( NULL != m_RColors )
|
if( NULL != m_RColors )
|
||||||
items[i] = true;
|
items[i] = true;
|
||||||
|
|
||||||
for( int i = 0; i < NITEMS; ++i )
|
for( int jj = 0; jj < NITEMS; ++jj )
|
||||||
aFile.write( (char*)&items[i], sizeof(bool) );
|
aFile.write( (char*)&items[jj], sizeof(bool) );
|
||||||
|
|
||||||
if( items[0] )
|
if( items[0] )
|
||||||
m_Coords->WriteCache( aFile, this );
|
m_Coords->WriteCache( aFile, this );
|
||||||
|
|
|
@ -486,8 +486,8 @@ bool SGSHAPE::WriteCache( std::ofstream& aFile, SGNODE* parentNode )
|
||||||
if( NULL != m_RFaceSet )
|
if( NULL != m_RFaceSet )
|
||||||
items[i] = true;
|
items[i] = true;
|
||||||
|
|
||||||
for( int i = 0; i < NITEMS; ++i )
|
for( int jj = 0; jj < NITEMS; ++jj )
|
||||||
aFile.write( (char*)&items[i], sizeof(bool) );
|
aFile.write( (char*)&items[jj], sizeof(bool) );
|
||||||
|
|
||||||
if( items[0] )
|
if( items[0] )
|
||||||
m_Appearance->WriteCache( aFile, this );
|
m_Appearance->WriteCache( aFile, this );
|
||||||
|
|
|
@ -185,16 +185,15 @@ void C3D_RENDER_OGL_LEGACY::reload()
|
||||||
// Add layers maps (except B_Mask and F_Mask)
|
// Add layers maps (except B_Mask and F_Mask)
|
||||||
// /////////////////////////////////////////////////////////////////////////
|
// /////////////////////////////////////////////////////////////////////////
|
||||||
printf("Add layers maps...\n");
|
printf("Add layers maps...\n");
|
||||||
for( MAP_CONTAINER_2D::const_iterator ii = m_settings.GetMapLayers().begin();
|
for( MAP_CONTAINER_2D::const_iterator it = m_settings.GetMapLayers().begin();
|
||||||
ii != m_settings.GetMapLayers().end();
|
it != m_settings.GetMapLayers().end(); it++ )
|
||||||
ii++ )
|
|
||||||
{
|
{
|
||||||
LAYER_ID layer_id = static_cast<LAYER_ID>(ii->first);
|
LAYER_ID layer_id = static_cast<LAYER_ID>(it->first);
|
||||||
|
|
||||||
if( !m_settings.Is3DLayerEnabled( layer_id ) )
|
if( !m_settings.Is3DLayerEnabled( layer_id ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const CBVHCONTAINER2D *container2d = static_cast<const CBVHCONTAINER2D *>(ii->second);
|
const CBVHCONTAINER2D *container2d = static_cast<const CBVHCONTAINER2D *>(it->second);
|
||||||
const LIST_OBJECT2D listObject2d = container2d->GetList();
|
const LIST_OBJECT2D listObject2d = container2d->GetList();
|
||||||
|
|
||||||
if( listObject2d.size() == 0 )
|
if( listObject2d.size() == 0 )
|
||||||
|
@ -277,8 +276,7 @@ void C3D_RENDER_OGL_LEGACY::reload()
|
||||||
m_triangles[layer_id] = layerTriangles;
|
m_triangles[layer_id] = layerTriangles;
|
||||||
|
|
||||||
for( LIST_OBJECT2D::const_iterator itemOnLayer = listObject2d.begin();
|
for( LIST_OBJECT2D::const_iterator itemOnLayer = listObject2d.begin();
|
||||||
itemOnLayer != listObject2d.end();
|
itemOnLayer != listObject2d.end(); itemOnLayer++ )
|
||||||
itemOnLayer++ )
|
|
||||||
{
|
{
|
||||||
const COBJECT2D *object2d_A = static_cast<const COBJECT2D *>(*itemOnLayer);
|
const COBJECT2D *object2d_A = static_cast<const COBJECT2D *>(*itemOnLayer);
|
||||||
|
|
||||||
|
@ -328,8 +326,7 @@ void C3D_RENDER_OGL_LEGACY::reload()
|
||||||
contournPoints.clear();
|
contournPoints.clear();
|
||||||
contournPoints.reserve( nr_sides_per_circle + 2 );
|
contournPoints.reserve( nr_sides_per_circle + 2 );
|
||||||
int delta = 3600 / nr_sides_per_circle;
|
int delta = 3600 / nr_sides_per_circle;
|
||||||
int ii;
|
for( int ii = 0; ii < 3600; ii += delta )
|
||||||
for( ii = 0; ii < 3600; ii += delta )
|
|
||||||
{
|
{
|
||||||
const SFVEC2F rotatedDir = glm::rotate( SFVEC2F( 0.0f, 1.0f ), (float)ii * 2.0f * 3.14f / 3600.0f );
|
const SFVEC2F rotatedDir = glm::rotate( SFVEC2F( 0.0f, 1.0f ), (float)ii * 2.0f * 3.14f / 3600.0f );
|
||||||
contournPoints.push_back( SFVEC2F( center.x - rotatedDir.y * radius, center.y + rotatedDir.x * radius ) );
|
contournPoints.push_back( SFVEC2F( center.x - rotatedDir.y * radius, center.y + rotatedDir.x * radius ) );
|
||||||
|
|
|
@ -206,7 +206,6 @@ void OGL_Draw_segment( const CROUNDSEGMENT2D &aSegment, unsigned int aNrSidesPer
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
const SFVEC2F start = aSegment.GetStart();
|
const SFVEC2F start = aSegment.GetStart();
|
||||||
const SFVEC2F end = aSegment.GetEnd();
|
|
||||||
const SFVEC2F end_minus_start = aSegment.GetEnd_minus_Start();
|
const SFVEC2F end_minus_start = aSegment.GetEnd_minus_Start();
|
||||||
const float radius = aSegment.GetRadius();
|
const float radius = aSegment.GetRadius();
|
||||||
const float width = aSegment.GetWidth();
|
const float width = aSegment.GetWidth();
|
||||||
|
|
|
@ -1109,9 +1109,9 @@ static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC )
|
||||||
|
|
||||||
sort( moduleList.begin(), moduleList.end(), Tri_PlaceModules );
|
sort( moduleList.begin(), moduleList.end(), Tri_PlaceModules );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < moduleList.size(); ii++ )
|
for( unsigned kk = 0; kk < moduleList.size(); kk++ )
|
||||||
{
|
{
|
||||||
Module = moduleList[ii];
|
Module = moduleList[kk];
|
||||||
Module->SetFlag( 0 );
|
Module->SetFlag( 0 );
|
||||||
|
|
||||||
if( !Module->NeedsPlaced() )
|
if( !Module->NeedsPlaced() )
|
||||||
|
|
|
@ -242,9 +242,9 @@ void SPECCTRA_DB::readTIME( time_t* time_stamp ) throw( IO_ERROR )
|
||||||
|
|
||||||
void SPECCTRA_DB::LoadPCB( const wxString& aFilename ) throw( IO_ERROR, boost::bad_pointer )
|
void SPECCTRA_DB::LoadPCB( const wxString& aFilename ) throw( IO_ERROR, boost::bad_pointer )
|
||||||
{
|
{
|
||||||
FILE_LINE_READER reader( aFilename );
|
FILE_LINE_READER curr_reader( aFilename );
|
||||||
|
|
||||||
PushReader( &reader );
|
PushReader( &curr_reader );
|
||||||
|
|
||||||
if( NextTok() != T_LEFT )
|
if( NextTok() != T_LEFT )
|
||||||
Expecting( T_LEFT );
|
Expecting( T_LEFT );
|
||||||
|
@ -261,9 +261,9 @@ void SPECCTRA_DB::LoadPCB( const wxString& aFilename ) throw( IO_ERROR, boost::b
|
||||||
|
|
||||||
void SPECCTRA_DB::LoadSESSION( const wxString& aFilename ) throw( IO_ERROR, boost::bad_pointer )
|
void SPECCTRA_DB::LoadSESSION( const wxString& aFilename ) throw( IO_ERROR, boost::bad_pointer )
|
||||||
{
|
{
|
||||||
FILE_LINE_READER reader( aFilename );
|
FILE_LINE_READER curr_reader( aFilename );
|
||||||
|
|
||||||
PushReader( &reader );
|
PushReader( &curr_reader );
|
||||||
|
|
||||||
if( NextTok() != T_LEFT )
|
if( NextTok() != T_LEFT )
|
||||||
Expecting( T_LEFT );
|
Expecting( T_LEFT );
|
||||||
|
|
|
@ -235,7 +235,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
||||||
int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
DIMENSION* dimension = NULL;
|
DIMENSION* dimension = NULL;
|
||||||
int width, maxThickness;
|
int maxThickness;
|
||||||
|
|
||||||
// if one day it is possible to draw dimensions in the footprint editor,
|
// if one day it is possible to draw dimensions in the footprint editor,
|
||||||
// then hereby I'm letting you know that this tool does not handle UR_MODEDIT undo yet
|
// then hereby I'm letting you know that this tool does not handle UR_MODEDIT undo yet
|
||||||
|
@ -322,7 +322,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
||||||
dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) );
|
dimension->SetEnd( wxPoint( cursorPos.x, cursorPos.y ) );
|
||||||
dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize );
|
dimension->Text().SetSize( m_board->GetDesignSettings().m_PcbTextSize );
|
||||||
|
|
||||||
width = m_board->GetDesignSettings().m_PcbTextWidth;
|
int width = m_board->GetDesignSettings().m_PcbTextWidth;
|
||||||
maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() );
|
maxThickness = Clamp_Text_PenSize( width, dimension->Text().GetSize() );
|
||||||
|
|
||||||
if( width > maxThickness )
|
if( width > maxThickness )
|
||||||
|
@ -453,8 +453,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT& aEvent )
|
||||||
KIGFX::VIEW_GROUP preview( m_view );
|
KIGFX::VIEW_GROUP preview( m_view );
|
||||||
|
|
||||||
// Build the undo list & add items to the current view
|
// Build the undo list & add items to the current view
|
||||||
std::list<BOARD_ITEM*>::const_iterator it, itEnd;
|
for( auto it = list.begin(), itEnd = list.end(); it != itEnd; ++it )
|
||||||
for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it )
|
|
||||||
{
|
{
|
||||||
KICAD_T type = (*it)->Type();
|
KICAD_T type = (*it)->Type();
|
||||||
assert( type == PCB_LINE_T || type == PCB_TEXT_T );
|
assert( type == PCB_LINE_T || type == PCB_TEXT_T );
|
||||||
|
|
Loading…
Reference in New Issue