Minor adjustments
This commit is contained in:
parent
ac94d72d2d
commit
07635d2fc7
|
@ -416,7 +416,7 @@ int OUTPUTFORMATTER::Print( int nestLevel, const char* fmt, ... )
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
for( int i=0; i<nestLevel; ++i )
|
for( int i = 0; i < nestLevel; ++i )
|
||||||
{
|
{
|
||||||
// no error checking needed, an exception indicates an error.
|
// no error checking needed, an exception indicates an error.
|
||||||
result = sprint( "%*c", NESTWIDTH, ' ' );
|
result = sprint( "%*c", NESTWIDTH, ' ' );
|
||||||
|
@ -438,11 +438,11 @@ std::string OUTPUTFORMATTER::Quotes( const std::string& aWrapee ) const
|
||||||
{
|
{
|
||||||
std::string ret;
|
std::string ret;
|
||||||
|
|
||||||
ret.reserve( aWrapee.size()*2 + 2 );
|
ret.reserve( aWrapee.size() * 2 + 2 );
|
||||||
|
|
||||||
ret += '"';
|
ret += '"';
|
||||||
|
|
||||||
for( std::string::const_iterator it = aWrapee.begin(); it!=aWrapee.end(); ++it )
|
for( std::string::const_iterator it = aWrapee.begin(); it != aWrapee.end(); ++it )
|
||||||
{
|
{
|
||||||
switch( *it )
|
switch( *it )
|
||||||
{
|
{
|
||||||
|
@ -497,9 +497,9 @@ void STRING_FORMATTER::StripUseless()
|
||||||
|
|
||||||
m_mystring.clear();
|
m_mystring.clear();
|
||||||
|
|
||||||
for( std::string::iterator i=copy.begin(); i!=copy.end(); ++i )
|
for( std::string::iterator i = copy.begin(); i != copy.end(); ++i )
|
||||||
{
|
{
|
||||||
if( !isspace( *i ) && *i!=')' && *i!='(' && *i!='"' )
|
if( !isspace( *i ) && *i != ')' && *i != '(' && *i != '"' )
|
||||||
{
|
{
|
||||||
m_mystring += *i;
|
m_mystring += *i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,4 +61,4 @@ protected:
|
||||||
void setDefaultLayerDeps(); ///> Sets rendering targets & dependencies for layers.
|
void setDefaultLayerDeps(); ///> Sets rendering targets & dependencies for layers.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // __SCH_DRAW_PANEL_H
|
||||||
|
|
|
@ -254,7 +254,7 @@ float SCH_PAINTER::getShadowWidth() const
|
||||||
|
|
||||||
// For best visuals the selection width must be a cross between the zoom level and the
|
// For best visuals the selection width must be a cross between the zoom level and the
|
||||||
// default line width.
|
// default line width.
|
||||||
return (float) fabs( matrix.GetScale().x * 2.75 ) + Mils2iu( eeconfig()->m_Selection.thickness );
|
return (float) std::fabs( matrix.GetScale().x * 2.75 ) + Mils2iu( eeconfig()->m_Selection.thickness );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -209,4 +209,4 @@ private:
|
||||||
}; // namespace KIGFX
|
}; // namespace KIGFX
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // __SCH_PAINTER_H
|
||||||
|
|
|
@ -87,7 +87,7 @@ void SCH_VIEW::ResizeSheetWorkingArea( const SCH_SCREEN* aScreen )
|
||||||
const PAGE_INFO& page_info = aScreen->GetPageSettings();
|
const PAGE_INFO& page_info = aScreen->GetPageSettings();
|
||||||
double max_size_x = page_info.GetWidthIU() * 3.0;
|
double max_size_x = page_info.GetWidthIU() * 3.0;
|
||||||
double max_size_y = page_info.GetHeightIU() * 3.0;
|
double max_size_y = page_info.GetHeightIU() * 3.0;
|
||||||
m_boundary.SetOrigin( -max_size_x/4, -max_size_y/4 );
|
m_boundary.SetOrigin( -max_size_x / 4, -max_size_y / 4 );
|
||||||
m_boundary.SetSize( max_size_x, max_size_y );
|
m_boundary.SetSize( max_size_x, max_size_y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,7 @@ public:
|
||||||
void TransformBoundingBoxWithClearanceToPolygon( SHAPE_POLY_SET* aCornerBuffer,
|
void TransformBoundingBoxWithClearanceToPolygon( SHAPE_POLY_SET* aCornerBuffer,
|
||||||
int aClearanceValue ) const;
|
int aClearanceValue ) const;
|
||||||
|
|
||||||
std::shared_ptr<SHAPE_COMPOUND> GetEffectiveTextShape( ) const;
|
std::shared_ptr<SHAPE_COMPOUND> GetEffectiveTextShape() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if \a aPoint is within the bounds of this object.
|
* Test if \a aPoint is within the bounds of this object.
|
||||||
|
|
|
@ -438,7 +438,7 @@ bool BOARD_STACKUP::SynchronizeWithBoard( BOARD_DESIGN_SETTINGS* aSettings )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now initialize all stackup items to the initial values, when exist
|
// Now initialize all stackup items to the initial values, when exist
|
||||||
for( BOARD_STACKUP_ITEM* item: stackup.GetList() )
|
for( BOARD_STACKUP_ITEM* item : stackup.GetList() )
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
// Search for initial settings:
|
// Search for initial settings:
|
||||||
|
@ -475,7 +475,7 @@ bool BOARD_STACKUP::SynchronizeWithBoard( BOARD_DESIGN_SETTINGS* aSettings )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transfer other stackup settings from aSettings
|
// Transfer other stackup settings from aSettings
|
||||||
BOARD_STACKUP& source_stackup = aSettings->GetStackupDescriptor();
|
const BOARD_STACKUP& source_stackup = aSettings->GetStackupDescriptor();
|
||||||
m_HasDielectricConstrains = source_stackup.m_HasDielectricConstrains;
|
m_HasDielectricConstrains = source_stackup.m_HasDielectricConstrains;
|
||||||
m_EdgeConnectorConstraints = source_stackup.m_EdgeConnectorConstraints;
|
m_EdgeConnectorConstraints = source_stackup.m_EdgeConnectorConstraints;
|
||||||
m_CastellatedPads = source_stackup.m_CastellatedPads;
|
m_CastellatedPads = source_stackup.m_CastellatedPads;
|
||||||
|
|
|
@ -168,7 +168,7 @@ public:
|
||||||
wxString FormatDielectricLayerName() const;
|
wxString FormatDielectricLayerName() const;
|
||||||
|
|
||||||
// Getters:
|
// Getters:
|
||||||
bool IsEnabled() const {return m_enabled; }
|
bool IsEnabled() const { return m_enabled; }
|
||||||
|
|
||||||
BOARD_STACKUP_ITEM_TYPE GetType() const { return m_Type; }
|
BOARD_STACKUP_ITEM_TYPE GetType() const { return m_Type; }
|
||||||
PCB_LAYER_ID GetBrdLayerId() const { return m_LayerId; }
|
PCB_LAYER_ID GetBrdLayerId() const { return m_LayerId; }
|
||||||
|
|
|
@ -986,7 +986,7 @@ void PCB_IO::format( const FOOTPRINT* aFootprint, int aNestLevel ) const
|
||||||
|
|
||||||
if( initial_comments )
|
if( initial_comments )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<initial_comments->GetCount(); ++i )
|
for( unsigned i = 0; i < initial_comments->GetCount(); ++i )
|
||||||
m_out->Print( aNestLevel, "%s\n", TO_UTF8( (*initial_comments)[i] ) );
|
m_out->Print( aNestLevel, "%s\n", TO_UTF8( (*initial_comments)[i] ) );
|
||||||
|
|
||||||
m_out->Print( 0, "\n" ); // improve readability?
|
m_out->Print( 0, "\n" ); // improve readability?
|
||||||
|
@ -1939,14 +1939,14 @@ void PCB_IO::format( const ZONE* aZone, int aNestLevel ) const
|
||||||
if( new_polygon )
|
if( new_polygon )
|
||||||
{
|
{
|
||||||
newLine = 0;
|
newLine = 0;
|
||||||
m_out->Print( aNestLevel+1, "(polygon\n" );
|
m_out->Print( aNestLevel + 1, "(polygon\n" );
|
||||||
m_out->Print( aNestLevel+2, "(pts\n" );
|
m_out->Print( aNestLevel + 2, "(pts\n" );
|
||||||
new_polygon = false;
|
new_polygon = false;
|
||||||
is_closed = false;
|
is_closed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( newLine == 0 )
|
if( newLine == 0 )
|
||||||
m_out->Print( aNestLevel+3, "(xy %s %s)",
|
m_out->Print( aNestLevel + 3, "(xy %s %s)",
|
||||||
FormatInternalUnits( iterator->x ).c_str(),
|
FormatInternalUnits( iterator->x ).c_str(),
|
||||||
FormatInternalUnits( iterator->y ).c_str() );
|
FormatInternalUnits( iterator->y ).c_str() );
|
||||||
else
|
else
|
||||||
|
@ -1971,8 +1971,8 @@ void PCB_IO::format( const ZONE* aZone, int aNestLevel ) const
|
||||||
if( newLine != 0 )
|
if( newLine != 0 )
|
||||||
m_out->Print( 0, "\n" );
|
m_out->Print( 0, "\n" );
|
||||||
|
|
||||||
m_out->Print( aNestLevel+2, ")\n" );
|
m_out->Print( aNestLevel + 2, ")\n" );
|
||||||
m_out->Print( aNestLevel+1, ")\n" );
|
m_out->Print( aNestLevel + 1, ")\n" );
|
||||||
new_polygon = true;
|
new_polygon = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1982,8 +1982,8 @@ void PCB_IO::format( const ZONE* aZone, int aNestLevel ) const
|
||||||
if( newLine != 0 )
|
if( newLine != 0 )
|
||||||
m_out->Print( 0, "\n" );
|
m_out->Print( 0, "\n" );
|
||||||
|
|
||||||
m_out->Print( aNestLevel+2, ")\n" );
|
m_out->Print( aNestLevel + 2, ")\n" );
|
||||||
m_out->Print( aNestLevel+1, ")\n" );
|
m_out->Print( aNestLevel + 1, ")\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -684,7 +684,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Checks if a given filled polygon is an insulated island
|
* Checks if a given filled polygon is an insulated island
|
||||||
* @param aLayer is the layer to test
|
* @param aLayer is the layer to test
|
||||||
* @param aPolyIdx is an inndex into m_FilledPolysList[aLayer]
|
* @param aPolyIdx is an index into m_FilledPolysList[aLayer]
|
||||||
* @return true if the given polygon is insulated (i.e. has no net connection)
|
* @return true if the given polygon is insulated (i.e. has no net connection)
|
||||||
*/
|
*/
|
||||||
bool IsIsland( PCB_LAYER_ID aLayer, int aPolyIdx ) const;
|
bool IsIsland( PCB_LAYER_ID aLayer, int aPolyIdx ) const;
|
||||||
|
|
|
@ -417,19 +417,19 @@ public:
|
||||||
bool Matches( double aDrillDia, double aPosX, double aPosY ) const;
|
bool Matches( double aDrillDia, double aPosX, double aPosY ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GettDrillDia
|
* Function GetDrillDia
|
||||||
* returns the drill diameter in mm
|
* returns the drill diameter in mm
|
||||||
*/
|
*/
|
||||||
double GetDrillDia() const;
|
double GetDrillDia() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GettDrillXPos
|
* Function GetDrillXPos
|
||||||
* returns the drill's X position in mm
|
* returns the drill's X position in mm
|
||||||
*/
|
*/
|
||||||
double GetDrillXPos() const;
|
double GetDrillXPos() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GettDrillYPos
|
* Function GetDrillYPos
|
||||||
* returns the drill's Y position in mm
|
* returns the drill's Y position in mm
|
||||||
*/
|
*/
|
||||||
double GetDrillYPos() const;
|
double GetDrillYPos() const;
|
||||||
|
|
Loading…
Reference in New Issue