Commit b556fb23 authored by jean-pierre charras's avatar jean-pierre charras

Class BOARD: Rename an overloaded method named SetLayer with the better name...

Class BOARD: Rename an overloaded method named SetLayer with the better name SetLayerDescr, and comment it. It also remove some warnings when compiled with option -Woverloaded-virtual
parent f5d9d09e
...@@ -303,7 +303,7 @@ void BOARD::PopHighLight() ...@@ -303,7 +303,7 @@ void BOARD::PopHighLight()
} }
bool BOARD::SetLayer( LAYER_ID aIndex, const LAYER& aLayer ) bool BOARD::SetLayerDescr( LAYER_ID aIndex, const LAYER& aLayer )
{ {
if( unsigned( aIndex ) < DIM( m_Layer ) ) if( unsigned( aIndex ) < DIM( m_Layer ) )
{ {
......
...@@ -661,7 +661,15 @@ public: ...@@ -661,7 +661,15 @@ public:
return LSET::Name( aLayerId ); return LSET::Name( aLayerId );
} }
bool SetLayer( LAYER_ID aIndex, const LAYER& aLayer ); /**
* Function SetLayerDescr
* returns the type of the copper layer given by aLayer.
*
* @param aIndex A layer index in m_Layer
* @param aLayer A reference to a LAYER description.
* @return false if the index was out of range.
*/
bool SetLayerDescr( LAYER_ID aIndex, const LAYER& aLayer );
/** /**
* Function GetLayerType * Function GetLayerType
......
...@@ -800,7 +800,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) ...@@ -800,7 +800,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR )
if( it->m_visible ) if( it->m_visible )
visibleLayers.set( it->m_number ); visibleLayers.set( it->m_number );
m_board->SetLayer( LAYER_ID( it->m_number ), *it ); m_board->SetLayerDescr( LAYER_ID( it->m_number ), *it );
UTF8 name = it->m_name; UTF8 name = it->m_name;
...@@ -838,7 +838,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) ...@@ -838,7 +838,7 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR )
// DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );) // DBG( printf( "aux m_visible:%s\n", layer.m_visible ? "true" : "false" );)
m_board->SetLayer( it->second, layer ); m_board->SetLayerDescr( it->second, layer );
token = NextTok(); token = NextTok();
......
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