Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases

This commit is contained in:
Camille 2017-09-23 11:20:10 +02:00 committed by Wayne Stambaugh
parent 3168d03fe5
commit 9ff66a5274
123 changed files with 404 additions and 370 deletions

View File

@ -39,7 +39,7 @@
* @param aXSize
* @param aYSize
*/
static void dbg_save_rgb_buffer( wxString aFileName,
static void dbg_save_rgb_buffer( const wxString& aFileName,
unsigned char *aRGBpixelBuffer,
unsigned int aXSize,
unsigned int aYSize )
@ -52,7 +52,7 @@ static void dbg_save_rgb_buffer( wxString aFileName,
}
void DBG_SaveBuffer( wxString aFileName,
void DBG_SaveBuffer( const wxString& aFileName,
const unsigned char *aInBuffer,
unsigned int aXSize,
unsigned int aYSize )
@ -75,7 +75,7 @@ void DBG_SaveBuffer( wxString aFileName,
}
void DBG_SaveBuffer( wxString aFileName,
void DBG_SaveBuffer( const wxString& aFileName,
const float *aInBuffer,
unsigned int aXSize,
unsigned int aYSize )
@ -99,7 +99,7 @@ void DBG_SaveBuffer( wxString aFileName,
}
void DBG_SaveBuffer( wxString aFileName,
void DBG_SaveBuffer( const wxString& aFileName,
const SFVEC3F *aInBuffer,
unsigned int aXSize,
unsigned int aYSize )
@ -123,7 +123,7 @@ void DBG_SaveBuffer( wxString aFileName,
}
void DBG_SaveNormalsBuffer( wxString aFileName,
void DBG_SaveNormalsBuffer( const wxString& aFileName,
const SFVEC3F *aInNormalsBuffer,
unsigned int aXSize,
unsigned int aYSize )

View File

@ -33,21 +33,21 @@
#include <plugins/3dapi/xv3d_types.h>
#include <wx/string.h>
void DBG_SaveBuffer( wxString aFileName,
void DBG_SaveBuffer( const wxString& aFileName,
const unsigned char *aInBuffer,
unsigned int aXSize, unsigned int aYSize );
void DBG_SaveBuffer( wxString aFileName,
void DBG_SaveBuffer( const wxString& aFileName,
const float *aInBuffer,
unsigned int aXSize,
unsigned int aYSize );
void DBG_SaveBuffer( wxString aFileName,
void DBG_SaveBuffer( const wxString& aFileName,
const SFVEC3F *aInBuffer,
unsigned int aXSize,
unsigned int aYSize );
void DBG_SaveNormalsBuffer( wxString aFileName,
void DBG_SaveNormalsBuffer( const wxString& aFileName,
const SFVEC3F *aInNormalsBuffer,
unsigned int aXSize,
unsigned int aYSize );

View File

@ -512,7 +512,7 @@ void CIMAGE::SetPixelsFromNormalizedFloat( const float * aNormalizedFloatArray )
}
void CIMAGE::SaveAsPNG( wxString aFileName ) const
void CIMAGE::SaveAsPNG( const wxString& aFileName ) const
{
DBG_SaveBuffer( aFileName, m_pixels, m_width, m_height );
}

View File

@ -186,7 +186,7 @@ public:
* each of RGB channel will have the 8bit-channel from the image.
* @param aFileName fime name (without extension)
*/
void SaveAsPNG( wxString aFileName ) const;
void SaveAsPNG( const wxString& aFileName ) const;
/**
* Function SetPixelsFromNormalizedFloat

View File

@ -30,6 +30,7 @@
#include <wx/stockitem.h>
#include <wx/richmsgdlg.h>
#include <confirm.h>
#include <bitmaps.h>
#include <html_messagebox.h>
#include <dialog_exit_base.h>
@ -84,7 +85,7 @@ void DisplayError( wxWindow* parent, const wxString& text, int displaytime )
}
void DisplayErrorMessage( wxWindow* aParent, const wxString& aText, const wxString aExtraInfo )
void DisplayErrorMessage( wxWindow* aParent, const wxString& aText, const wxString& aExtraInfo )
{
wxRichMessageDialog* dlg;
@ -101,7 +102,7 @@ void DisplayErrorMessage( wxWindow* aParent, const wxString& aText, const wxStri
}
void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxString aExtraInfo )
void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxString& aExtraInfo )
{
wxRichMessageDialog* dlg;

View File

@ -47,6 +47,7 @@
#include <macros.h>
#include <pgm_base.h>
#include <thread>
#include <utility>
#include <wildcards_and_files_ext.h>
@ -205,7 +206,7 @@ int FOOTPRINT_ASYNC_LOADER::GetProgress() const
void FOOTPRINT_ASYNC_LOADER::SetCompletionCallback( std::function<void()> aCallback )
{
m_completion_cb = aCallback;
m_completion_cb = std::move(aCallback);
}

View File

@ -69,7 +69,7 @@ GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
{}
void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase* aCfg, wxString aBaseName )
void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase* aCfg, const wxString& aBaseName )
{
long readLong; // Temp value buffer
@ -100,7 +100,7 @@ void GAL_DISPLAY_OPTIONS::ReadConfig( wxConfigBase* aCfg, wxString aBaseName )
}
void GAL_DISPLAY_OPTIONS::WriteConfig( wxConfigBase* aCfg, wxString aBaseName )
void GAL_DISPLAY_OPTIONS::WriteConfig( wxConfigBase* aCfg, const wxString& aBaseName )
{
aCfg->Write( aBaseName + GalGLAntialiasingKeyword,
UTIL::GetConfigForVal( aaModeConfigVals, gl_antialiasing_mode ) );

View File

@ -1545,7 +1545,7 @@ void OPENGL_GAL::drawPolygon( GLdouble* aPoints, int aPointCount )
}
void OPENGL_GAL::drawPolyline( std::function<VECTOR2D (int)> aPointGetter, int aPointCount )
void OPENGL_GAL::drawPolyline( const std::function<VECTOR2D (int)>& aPointGetter, int aPointCount )
{
if( aPointCount < 2 )
return;

View File

@ -115,7 +115,7 @@ SHAPE* SHAPE_FILE_IO::Read()
}
void SHAPE_FILE_IO::BeginGroup( const std::string aName )
void SHAPE_FILE_IO::BeginGroup( const std::string& aName )
{
assert( m_mode != IOM_READ );
@ -139,7 +139,7 @@ void SHAPE_FILE_IO::EndGroup()
}
void SHAPE_FILE_IO::Write( const SHAPE* aShape, const std::string aName )
void SHAPE_FILE_IO::Write( const SHAPE* aShape, const std::string& aName )
{
assert( m_mode != IOM_READ );

View File

@ -1657,7 +1657,7 @@ int SHAPE_POLY_SET::Distance( VECTOR2I aPoint )
}
int SHAPE_POLY_SET::Distance( SEG aSegment, int aSegmentWidth )
int SHAPE_POLY_SET::Distance( const SEG& aSegment, int aSegmentWidth )
{
int currentDistance;
int minDistance = DistanceToPolygon( aSegment, 0 );

View File

@ -24,6 +24,8 @@
#include <incremental_text_ctrl.h>
#include <utility>
/**
* Check that a string looks like a floating point number that can
* be dealt with.
@ -61,7 +63,7 @@ void INCREMENTAL_TEXT_CTRL::SetStep( double aMin, double aMax,
m_minVal = std::min( aMin, aMax );
m_maxVal = std::max( aMin, aMax );
m_stepFunc = aStepFunc;
m_stepFunc = std::move( aStepFunc );
// finally, clamp the current value and re-display
updateTextValue();

View File

@ -34,7 +34,7 @@
#endif
int SEARCH_STACK::Split( wxArrayString* aResult, const wxString aPathString )
int SEARCH_STACK::Split( wxArrayString* aResult, const wxString& aPathString )
{
wxStringTokenizer tokenizer( aPathString, PATH_SEPS, wxTOKEN_STRTOK );

View File

@ -28,7 +28,7 @@
#include <algorithm>
TOOL_ACTION::TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope,
int aDefaultHotKey, const wxString aMenuItem, const wxString& aMenuDesc,
int aDefaultHotKey, const wxString& aMenuItem, const wxString& aMenuDesc,
const BITMAP_OPAQUE* aIcon, TOOL_ACTION_FLAGS aFlags, void* aParam ) :
m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ),
m_menuItem( aMenuItem ), m_menuDescription( aMenuDesc ),

View File

@ -452,7 +452,7 @@ double mpScaleY::P2x( mpWindow& w, double x )
IMPLEMENT_ABSTRACT_CLASS( mpFX, mpLayer )
mpFX::mpFX( wxString name, int flags )
mpFX::mpFX( const wxString& name, int flags )
{
SetName( name );
m_flags = flags;
@ -529,7 +529,7 @@ void mpFX::Plot( wxDC& dc, mpWindow& w )
IMPLEMENT_ABSTRACT_CLASS( mpFY, mpLayer )
mpFY::mpFY( wxString name, int flags )
mpFY::mpFY( const wxString& name, int flags )
{
SetName( name );
m_flags = flags;
@ -598,7 +598,7 @@ void mpFY::Plot( wxDC& dc, mpWindow& w )
IMPLEMENT_ABSTRACT_CLASS( mpFXY, mpLayer )
mpFXY::mpFXY( wxString name, int flags )
mpFXY::mpFXY( const wxString& name, int flags )
{
SetName( name );
m_flags = flags;
@ -790,7 +790,7 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
IMPLEMENT_ABSTRACT_CLASS( mpProfile, mpLayer )
mpProfile::mpProfile( wxString name, int flags )
mpProfile::mpProfile( const wxString& name, int flags )
{
SetName( name );
m_flags = flags;
@ -1273,7 +1273,7 @@ IMPLEMENT_ABSTRACT_CLASS( mpScaleXBase, mpLayer )
IMPLEMENT_DYNAMIC_CLASS( mpScaleX, mpScaleXBase )
IMPLEMENT_DYNAMIC_CLASS( mpScaleXLog, mpScaleXBase )
mpScaleXBase::mpScaleXBase( wxString name, int flags, bool ticks, unsigned int type )
mpScaleXBase::mpScaleXBase( const wxString& name, int flags, bool ticks, unsigned int type )
{
SetName( name );
SetFont( (wxFont&) *wxSMALL_FONT );
@ -1285,13 +1285,13 @@ mpScaleXBase::mpScaleXBase( wxString name, int flags, bool ticks, unsigned int t
}
mpScaleX::mpScaleX( wxString name, int flags, bool ticks, unsigned int type ) :
mpScaleX::mpScaleX( const wxString& name, int flags, bool ticks, unsigned int type ) :
mpScaleXBase( name, flags, ticks, type )
{
}
mpScaleXLog::mpScaleXLog( wxString name, int flags, bool ticks, unsigned int type ) :
mpScaleXLog::mpScaleXLog( const wxString& name, int flags, bool ticks, unsigned int type ) :
mpScaleXBase( name, flags, ticks, type )
{
}
@ -1501,7 +1501,7 @@ void mpScaleXBase::Plot( wxDC& dc, mpWindow& w )
IMPLEMENT_DYNAMIC_CLASS( mpScaleY, mpLayer )
mpScaleY::mpScaleY( wxString name, int flags, bool ticks )
mpScaleY::mpScaleY( const wxString& name, int flags, bool ticks )
{
SetName( name );
SetFont( (wxFont&) *wxSMALL_FONT );
@ -3268,7 +3268,7 @@ void mpWindow::SetColourTheme( const wxColour& bgColour,
IMPLEMENT_DYNAMIC_CLASS( mpFXYVector, mpFXY )
// Constructor
mpFXYVector::mpFXYVector( wxString name, int flags ) : mpFXY( name, flags )
mpFXYVector::mpFXYVector( const wxString& name, int flags ) : mpFXY( name, flags )
{
m_index = 0;
// printf("FXYVector::FXYVector!\n");
@ -3425,7 +3425,7 @@ IMPLEMENT_DYNAMIC_CLASS( mpText, mpLayer )
* @param offsetx x position in percentage (0-100)
* @param offsetx y position in percentage (0-100)
*/
mpText::mpText( wxString name, int offsetx, int offsety )
mpText::mpText( const wxString& name, int offsetx, int offsety )
{
SetName( name );

View File

@ -82,7 +82,7 @@ BOM_COLUMN* BOM_COLUMN_LIST::GetColumnById( unsigned int aColId )
/**
* Return a column based on its string title
*/
BOM_COLUMN* BOM_COLUMN_LIST::GetColumnByTitle( wxString aColTitle )
BOM_COLUMN* BOM_COLUMN_LIST::GetColumnByTitle( const wxString& aColTitle )
{
for( unsigned int ii=0; ii<Columns.size(); ii++ )
{
@ -110,7 +110,7 @@ bool BOM_COLUMN_LIST::ContainsColumn( unsigned int aColId )
/**
* Test if the list includes a column with the given title
*/
bool BOM_COLUMN_LIST::ContainsColumn( wxString aColTitle )
bool BOM_COLUMN_LIST::ContainsColumn( const wxString& aColTitle )
{
return nullptr != GetColumnByTitle( aColTitle );
}

View File

@ -138,10 +138,10 @@ public:
BOM_COLUMN* GetColumnByIndex( unsigned int aColIndex );
BOM_COLUMN* GetColumnById( unsigned int aColId );
BOM_COLUMN* GetColumnByTitle( const wxString aColTitle ) ;
BOM_COLUMN* GetColumnByTitle( const wxString& aColTitle ) ;
bool ContainsColumn( unsigned int aColId );
bool ContainsColumn( const wxString aColTitle );
bool ContainsColumn( const wxString& aColTitle );
bool AddColumn( BOM_COLUMN* aCol );

View File

@ -56,7 +56,7 @@ static BOM_TABLE_ROW const* ItemToRow( wxDataViewItem aItem )
}
BOM_FIELD_VALUES::BOM_FIELD_VALUES( wxString aRefDes, FIELD_VALUE_MAP* aTemplate ) :
BOM_FIELD_VALUES::BOM_FIELD_VALUES( const wxString& aRefDes, FIELD_VALUE_MAP* aTemplate ) :
m_refDes( aRefDes ),
m_templateValues( aTemplate )
{
@ -542,7 +542,7 @@ BOM_TABLE_COMPONENT::BOM_TABLE_COMPONENT( BOM_TABLE_GROUP* aParent,
* Try to add a unit to this component
* If the references match, it will be added
*/
bool BOM_TABLE_COMPONENT::AddUnit( SCH_REFERENCE aUnit )
bool BOM_TABLE_COMPONENT::AddUnit( const SCH_REFERENCE& aUnit )
{
// Addition is successful if the references match or there are currently no units in the group
if( Units.size() == 0 || Units[0].GetRef().Cmp( aUnit.GetRef() ) == 0 )

View File

@ -58,7 +58,7 @@ typedef std::map<unsigned int, wxString> FIELD_VALUE_MAP;
class BOM_FIELD_VALUES
{
public:
BOM_FIELD_VALUES( wxString aRefDes, FIELD_VALUE_MAP* aTemplate );
BOM_FIELD_VALUES( const wxString& aRefDes, FIELD_VALUE_MAP* aTemplate );
/**
* Return the current value for the provided field ID
@ -218,7 +218,7 @@ public:
BOM_TABLE_COMPONENT( BOM_TABLE_GROUP* aParent, BOM_COLUMN_LIST* aColumnList, BOM_FIELD_VALUES* aValues );
bool AddUnit( SCH_REFERENCE aUnit );
bool AddUnit( const SCH_REFERENCE& aUnit );
virtual wxString GetFieldValue( unsigned int aFieldId ) const override;

View File

@ -52,7 +52,7 @@ class wxConfigBase;
class DIALOG_ANNOTATE: public DIALOG_ANNOTATE_BASE
{
public:
DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, wxString message );
DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& message );
private:
@ -98,7 +98,7 @@ private:
};
DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, wxString message )
DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& message )
: DIALOG_ANNOTATE_BASE( parent )
{
m_Parent = parent;
@ -311,7 +311,7 @@ int DIALOG_ANNOTATE::GetAnnotateAlgo()
}
int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller, wxString message )
int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller, const wxString& message )
{
DIALOG_ANNOTATE dlg( aCaller, message );

View File

@ -67,7 +67,7 @@ int InvokeDialogRescueEach( SCH_EDIT_FRAME* aCaller, RESCUER& aRescuer, bool aAs
/// Create and show DIALOG_ANNOTATE and return whatever
/// DIALOG_ANNOTATE::ShowModal() returns.
int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller, wxString message = "" );
int InvokeDialogAnnotate( SCH_EDIT_FRAME* aCaller, const wxString& message = "" );
/// Create the modeless DIALOG_ERC and show it, return something to
/// destroy or close it. The dialog will have ID_DIALOG_ERC from id.h

View File

@ -91,7 +91,7 @@ static void get_components( std::vector<SCH_COMPONENT*>& aComponents )
* @param aLibs - the loaded PART_LIBS
* @param aCached - whether we are looking for the cached part
*/
static LIB_PART* find_component( wxString aName, PART_LIBS* aLibs, bool aCached )
static LIB_PART* find_component( const wxString& aName, PART_LIBS* aLibs, bool aCached )
{
LIB_PART *part = NULL;

View File

@ -900,7 +900,7 @@ SCH_FIELD* SCH_COMPONENT::GetField( int aFieldNdx ) const
}
wxString SCH_COMPONENT::GetFieldText( wxString aFieldName, bool aIncludeDefaultFields ) const
wxString SCH_COMPONENT::GetFieldText( const wxString& aFieldName, bool aIncludeDefaultFields ) const
{
// Field name for comparison
wxString cmpFieldName;

View File

@ -334,7 +334,7 @@ public:
* @param aIncludeDefaultFields is used to search the default library symbol fields in the
* search.
*/
wxString GetFieldText( wxString aFieldName, bool aIncludeDefaultFields = true ) const;
wxString GetFieldText( const wxString& aFieldName, bool aIncludeDefaultFields = true ) const;
/**
* Populates a std::vector with SCH_FIELDs.

View File

@ -52,7 +52,7 @@
#include <kicad_string.h>
SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent, wxString aName ) :
SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent, const wxString& aName ) :
SCH_ITEM( aParent, SCH_FIELD_T ),
EDA_TEXT()
{

View File

@ -61,7 +61,7 @@ class SCH_FIELD : public SCH_ITEM, public EDA_TEXT
public:
SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent,
wxString aName = wxEmptyString );
const wxString& aName = wxEmptyString );
// Do not create a copy constructor. The one generated by the compiler is adequate.

View File

@ -436,7 +436,7 @@ SCH_SHEET_LIST::SCH_SHEET_LIST( SCH_SHEET* aSheet )
}
SCH_SHEET_PATH* SCH_SHEET_LIST::GetSheetByPath( const wxString aPath, bool aHumanReadable )
SCH_SHEET_PATH* SCH_SHEET_LIST::GetSheetByPath( const wxString& aPath, bool aHumanReadable )
{
wxString sheetPath;

View File

@ -349,7 +349,7 @@ public:
* @return The sheet that matches \a aPath or NULL if no sheet matching
* \a aPath is found.
*/
SCH_SHEET_PATH* GetSheetByPath( const wxString aPath, bool aHumanReadable = true );
SCH_SHEET_PATH* GetSheetByPath( const wxString& aPath, bool aHumanReadable = true );
/**
* Function IsModified

View File

@ -71,7 +71,7 @@ class BOARD_ITEM : public EDA_ITEM
protected:
PCB_LAYER_ID m_Layer;
static int getTrailingInt( wxString aStr );
static int getTrailingInt( const wxString& aStr );
static int getNextNumberInSequence( const std::set<int>& aSeq, bool aFillSequenceGaps );
public:

View File

@ -66,7 +66,7 @@ void DisplayError( wxWindow* parent, const wxString& aMessage, int displaytime =
* @param aMessage is the message text to display
* @param aExtraInfo is extra data that can be optionally displayed in a collapsible pane
*/
void DisplayErrorMessage( wxWindow* aParent, const wxString& aMessage, const wxString aExtraInfo = wxEmptyString );
void DisplayErrorMessage( wxWindow* aParent, const wxString& aMessage, const wxString& aExtraInfo = wxEmptyString );
/**
@ -77,7 +77,7 @@ void DisplayErrorMessage( wxWindow* aParent, const wxString& aMessage, const wxS
* @param aMessage is the message text to display
* @param aExtraInfo is the extra data that can be optionally displayed in a collapsible pane
*/
void DisplayInfoMessage( wxWindow* parent, const wxString& aMessage, const wxString aExtraInfo = wxEmptyString );
void DisplayInfoMessage( wxWindow* parent, const wxString& aMessage, const wxString& aExtraInfo = wxEmptyString );
/**
* Function IsOK

View File

@ -66,8 +66,8 @@ namespace KIGFX
public:
GAL_DISPLAY_OPTIONS();
void ReadConfig ( wxConfigBase* aCfg, wxString aBaseName );
void WriteConfig( wxConfigBase* aCfg, wxString aBaseName );
void ReadConfig ( wxConfigBase* aCfg, const wxString& aBaseName );
void WriteConfig( wxConfigBase* aCfg, const wxString& aBaseName );
void NotifyChanged();

View File

@ -376,7 +376,7 @@ private:
* @param aPointGetter is a function to obtain coordinates of n-th vertex.
* @param aPointCount is the number of points to be drawn.
*/
void drawPolyline( std::function<VECTOR2D (int)> aPointGetter, int aPointCount );
void drawPolyline( const std::function<VECTOR2D (int)>& aPointGetter, int aPointCount );
/**
* @brief Draws a filled polygon. It does not need the last point to have the same coordinates

View File

@ -49,12 +49,12 @@ class SHAPE_FILE_IO
SHAPE_FILE_IO( const std::string& aFilename, IO_MODE aMode = IOM_READ );
~SHAPE_FILE_IO();
void BeginGroup( const std::string aName = "<noname>");
void BeginGroup( const std::string& aName = "<noname>");
void EndGroup();
SHAPE* Read();
void Write( const SHAPE* aShape, const std::string aName = "<noname>" );
void Write( const SHAPE* aShape, const std::string& aName = "<noname>" );
void Write( const SHAPE& aShape, const std::string aName = "<noname>" )
{

View File

@ -1058,7 +1058,7 @@ class SHAPE_POLY_SET : public SHAPE
* @return int - The minimum distance between aSegment and all the polygons in the set.
* If the point is contained in the polygon, the distance is zero.
*/
int Distance( SEG aSegment, int aSegmentWidth = 0 );
int Distance( const SEG& aSegment, int aSegmentWidth = 0 );
/**
* Function IsVertexInHole.

View File

@ -105,7 +105,7 @@ public:
* @param aPathString is concatonated string with interposing ';' or ':' separators.
* @return int - the count of paths found in aPathString
*/
static int Split( wxArrayString* aResult, const wxString aPathString );
static int Split( wxArrayString* aResult, const wxString& aPathString );
#if 1 // this function is so poorly designed it deserves not to exist.
/**

View File

@ -47,7 +47,7 @@ class TOOL_ACTION
{
public:
TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope = AS_CONTEXT,
int aDefaultHotKey = 0, const wxString aMenuItem = wxEmptyString,
int aDefaultHotKey = 0, const wxString& aMenuItem = wxEmptyString,
const wxString& aMenuDesc = wxEmptyString, const BITMAP_OPAQUE* aIcon = NULL,
TOOL_ACTION_FLAGS aFlags = AF_NONE, void* aParam = NULL );

View File

@ -525,7 +525,7 @@ public:
/** @param name Label
* @param flags Label alignment, pass one of #mpALIGN_RIGHT, #mpALIGN_CENTER, #mpALIGN_LEFT.
*/
mpFX( wxString name = wxEmptyString, int flags = mpALIGN_RIGHT );
mpFX( const wxString& name = wxEmptyString, int flags = mpALIGN_RIGHT );
/** Get function value for argument.
* Override this function in your implementation.
@ -557,7 +557,7 @@ public:
/** @param name Label
* @param flags Label alignment, pass one of #mpALIGN_BOTTOM, #mpALIGN_CENTER, #mpALIGN_TOP.
*/
mpFY( wxString name = wxEmptyString, int flags = mpALIGN_TOP );
mpFY( const wxString& name = wxEmptyString, int flags = mpALIGN_TOP );
/** Get function value for argument.
* Override this function in your implementation.
@ -591,7 +591,7 @@ public:
/** @param name Label
* @param flags Label alignment, pass one of #mpALIGN_NE, #mpALIGN_NW, #mpALIGN_SW, #mpALIGN_SE.
*/
mpFXY( wxString name = wxEmptyString, int flags = mpALIGN_NE );
mpFXY( const wxString& name = wxEmptyString, int flags = mpALIGN_NE );
/** Rewind value enumeration with mpFXY::GetNextXY.
* Override this function in your implementation.
@ -650,7 +650,7 @@ public:
/** @param name Label
* @param flags Label alignment, pass one of #mpALIGN_BOTTOM, #mpALIGN_CENTER, #mpALIGN_TOP.
*/
mpProfile( wxString name = wxEmptyString, int flags = mpALIGN_TOP );
mpProfile( const wxString& name = wxEmptyString, int flags = mpALIGN_TOP );
/** Get function value for argument.
* Override this function in your implementation.
@ -845,7 +845,7 @@ public:
* @param ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid.
* @param type mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds.
*/
mpScaleXBase( wxString name = wxT("X"), int flags = mpALIGN_CENTER,
mpScaleXBase( const wxString& name = wxT("X"), int flags = mpALIGN_CENTER,
bool ticks = true, unsigned int type = mpX_NORMAL );
virtual ~mpScaleXBase() {};
@ -871,7 +871,7 @@ public:
* @param flags Set the position of the scale with respect to the window.
* @param ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid.
* @param type mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds. */
mpScaleX( wxString name = wxT("X"), int flags = mpALIGN_CENTER,
mpScaleX( const wxString& name = wxT("X"), int flags = mpALIGN_CENTER,
bool ticks = true, unsigned int type = mpX_NORMAL );
/** Layer plot handler.
@ -900,7 +900,7 @@ public:
* @param ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid.
* @param type mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds.
*/
mpScaleXLog( wxString name = wxT("log(X)"), int flags = mpALIGN_CENTER,
mpScaleXLog( const wxString& name = wxT("log(X)"), int flags = mpALIGN_CENTER,
bool ticks = true, unsigned int type = mpX_NORMAL );
virtual double TransformToPlot( double x ) override;
@ -942,7 +942,7 @@ public:
* @param flags Set position of the scale respect to the window.
* @param ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid
*/
mpScaleY( wxString name = wxT("Y"), int flags = mpALIGN_CENTER, bool ticks = true );
mpScaleY( const wxString& name = wxT("Y"), int flags = mpALIGN_CENTER, bool ticks = true );
virtual bool IsHorizontal() override { return false; }
@ -1544,7 +1544,7 @@ public:
/** @param name Label
* @param flags Label alignment, pass one of #mpALIGN_NE, #mpALIGN_NW, #mpALIGN_SW, #mpALIGN_SE.
*/
mpFXYVector( wxString name = wxEmptyString, int flags = mpALIGN_NE );
mpFXYVector( const wxString& name = wxEmptyString, int flags = mpALIGN_NE );
virtual ~mpFXYVector() {}
@ -1644,7 +1644,7 @@ public:
/** @param name text to be drawn in the plot
* @param offsetx holds offset for the X location in percentage (0-100)
* @param offsety holds offset for the Y location in percentage (0-100) */
mpText( wxString name = wxT("Title"), int offsetx = 5, int offsety = 50 );
mpText( const wxString& name = wxT("Title"), int offsetx = 5, int offsety = 50 );
/** Text Layer plot handler.
* This implementation will plot text adjusted to the visible area. */

View File

@ -109,7 +109,7 @@ void LAUNCHER_PANEL::CreateCommandToolbar()
* @param aBitmap is the image to be used
* @param aToolTip is the button mouse-over tool tip
*/
void LAUNCHER_PANEL::AddButton( wxWindowID aId, const wxBitmap& aBitmap, wxString aToolTip )
void LAUNCHER_PANEL::AddButton( wxWindowID aId, const wxBitmap& aBitmap, const wxString& aToolTip )
{
wxSize buttSize( aBitmap.GetWidth() + 2 * BUTTON_EXPANSION,
aBitmap.GetHeight() + 2 * BUTTON_EXPANSION );

View File

@ -339,7 +339,7 @@ private:
*/
void CreateCommandToolbar( void );
void AddButton( wxWindowID aId, const wxBitmap& aBitmap, wxString aToolTip );
void AddButton( wxWindowID aId, const wxBitmap& aBitmap, const wxString& aToolTip );
};
// The C++ project manager includes a single PROJECT in its link image.

View File

@ -11,6 +11,7 @@
******************************************************************************/
#include <iostream>
#include <utility>
#include <math.h>
#include "drw_objects.h"
#include "intern/dxfreader.h"
@ -731,7 +732,7 @@ void DRW_ImageDef::parseCode( int code, dxfReader* reader )
}
void DRW_Header::addComment( std::string c )
void DRW_Header::addComment( const std::string& c )
{
if( !comments.empty() )
comments += '\n';
@ -1303,7 +1304,7 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver )
}
void DRW_Header::addDouble( std::string key, double value, int code )
void DRW_Header::addDouble( const std::string& key, double value, int code )
{
curr = new DRW_Variant();
curr->addDouble( value );
@ -1312,7 +1313,7 @@ void DRW_Header::addDouble( std::string key, double value, int code )
}
void DRW_Header::addInt( std::string key, int value, int code )
void DRW_Header::addInt( const std::string& key, int value, int code )
{
curr = new DRW_Variant();
curr->addInt( value );
@ -1321,16 +1322,16 @@ void DRW_Header::addInt( std::string key, int value, int code )
}
void DRW_Header::addStr( std::string key, std::string value, int code )
void DRW_Header::addStr( const std::string& key, std::string value, int code )
{
curr = new DRW_Variant();
curr->addString( value );
curr->addString( std::move(value) );
curr->code = code;
vars[key] = curr;
}
void DRW_Header::addCoord( std::string key, DRW_Coord value, int code )
void DRW_Header::addCoord( const std::string& key, DRW_Coord value, int code )
{
curr = new DRW_Variant();
curr->addCoord( value );
@ -1339,7 +1340,7 @@ void DRW_Header::addCoord( std::string key, DRW_Coord value, int code )
}
bool DRW_Header::getDouble( std::string key, double* varDouble )
bool DRW_Header::getDouble( const std::string& key, double* varDouble )
{
bool result = false;
std::map<std::string, DRW_Variant*>::iterator it;
@ -1363,7 +1364,7 @@ bool DRW_Header::getDouble( std::string key, double* varDouble )
}
bool DRW_Header::getInt( std::string key, int* varInt )
bool DRW_Header::getInt( const std::string& key, int* varInt )
{
bool result = false;
std::map<std::string, DRW_Variant*>::iterator it;
@ -1387,7 +1388,7 @@ bool DRW_Header::getInt( std::string key, int* varInt )
}
bool DRW_Header::getStr( std::string key, std::string* varStr )
bool DRW_Header::getStr( const std::string& key, std::string* varStr )
{
bool result = false;
std::map<std::string, DRW_Variant*>::iterator it;
@ -1411,7 +1412,7 @@ bool DRW_Header::getStr( std::string key, std::string* varStr )
}
bool DRW_Header::getCoord( std::string key, DRW_Coord* varCoord )
bool DRW_Header::getCoord( const std::string& key, DRW_Coord* varCoord )
{
bool result = false;
std::map<std::string, DRW_Variant*>::iterator it;

View File

@ -426,22 +426,22 @@ public:
vars.clear();
}
void addDouble( std::string key, double value, int code );
void addInt( std::string key, int value, int code );
void addStr( std::string key, std::string value, int code );
void addCoord( std::string key, DRW_Coord value, int code );
void addDouble( const std::string& key, double value, int code );
void addInt( const std::string& key, int value, int code );
void addStr( const std::string& key, std::string value, int code );
void addCoord( const std::string& key, DRW_Coord value, int code );
std::string getComments() const { return comments; }
void parseCode( int code, dxfReader* reader );
void write( dxfWriter* writer, DRW::Version ver );
void addComment( std::string c );
void addComment( const std::string& c );
private:
bool getDouble( std::string key, double* varDouble );
bool getInt( std::string key, int* varInt );
bool getStr( std::string key, std::string* varStr );
bool getCoord( std::string key, DRW_Coord* varStr );
bool getDouble( const std::string& key, double* varDouble );
bool getInt( const std::string& key, int* varInt );
bool getStr( const std::string& key, std::string* varStr );
bool getCoord( const std::string& key, DRW_Coord* varStr );
public:
std::map<std::string, DRW_Variant*> vars;

View File

@ -235,7 +235,7 @@ std::string DRW_ConvTable::toUtf8( std::string* s )
}
std::string DRW_Converter::encodeText( std::string stmp )
std::string DRW_Converter::encodeText( const std::string& stmp )
{
int code;

View File

@ -43,7 +43,7 @@ public:
virtual ~DRW_Converter() {}
virtual std::string fromUtf8( std::string* s ) { return *s; }
virtual std::string toUtf8( std::string* s );
std::string encodeText( std::string stmp );
std::string encodeText( const std::string& stmp );
std::string decodeText( int c );
std::string encodeNum( int c );
int decodeNum( std::string s, int* b );

View File

@ -14,6 +14,7 @@
#include <fstream>
#include <string>
#include <algorithm>
#include <utility>
#include "dxfwriter.h"
#ifdef DRW_DBG
@ -100,7 +101,7 @@
bool dxfWriter::writeUtf8String( int code, std::string text )
{
std::string t = encoder.fromUtf8( text );
std::string t = encoder.fromUtf8( std::move(text) );
return writeString( code, t );
}
@ -108,7 +109,7 @@ bool dxfWriter::writeUtf8String( int code, std::string text )
bool dxfWriter::writeUtf8Caps( int code, std::string text )
{
std::string strname = text;
std::string strname = std::move(text);
std::transform( strname.begin(), strname.end(), strname.begin(), ::toupper );
std::string t = encoder.fromUtf8( strname );

View File

@ -1685,7 +1685,7 @@ bool dxfRW::writeViewport( DRW_Viewport* ent )
}
DRW_ImageDef* dxfRW::writeImage( DRW_Image* ent, std::string name )
DRW_ImageDef* dxfRW::writeImage( DRW_Image* ent, const std::string& name )
{
if( version > DRW::AC1009 )
{
@ -1741,7 +1741,7 @@ DRW_ImageDef* dxfRW::writeImage( DRW_Image* ent, std::string name )
}
bool dxfRW::writeBlockRecord( std::string name )
bool dxfRW::writeBlockRecord( const std::string& name )
{
if( version > DRW::AC1009 )
{

View File

@ -59,14 +59,14 @@ public:
bool writeLWPolyline( DRW_LWPolyline* ent );
bool writePolyline( DRW_Polyline* ent );
bool writeSpline( DRW_Spline* ent );
bool writeBlockRecord( std::string name );
bool writeBlockRecord( const std::string& name );
bool writeBlock( DRW_Block* ent );
bool writeInsert( DRW_Insert* ent );
bool writeMText( DRW_MText* ent );
bool writeText( DRW_Text* ent );
bool writeHatch( DRW_Hatch* ent );
bool writeViewport( DRW_Viewport* ent );
DRW_ImageDef* writeImage( DRW_Image* ent, std::string name );
DRW_ImageDef* writeImage( DRW_Image* ent, const std::string& name );
bool writeLeader( DRW_Leader* ent );
bool writeDimension( DRW_Dimension* ent );

View File

@ -177,7 +177,7 @@ PCB_CALCULATOR_DATAFILE_PARSER::PCB_CALCULATOR_DATAFILE_PARSER( LINE_READER* aRe
}
PCB_CALCULATOR_DATAFILE_PARSER::PCB_CALCULATOR_DATAFILE_PARSER( char* aLine, wxString aSource ) :
PCB_CALCULATOR_DATAFILE_PARSER::PCB_CALCULATOR_DATAFILE_PARSER( char* aLine, const wxString& aSource ) :
PCB_CALCULATOR_DATAFILE_LEXER( aLine, aSource )
{
}

View File

@ -56,7 +56,7 @@ class PCB_CALCULATOR_DATAFILE_PARSER : public PCB_CALCULATOR_DATAFILE_LEXER
{
public:
PCB_CALCULATOR_DATAFILE_PARSER( LINE_READER* aReader );
PCB_CALCULATOR_DATAFILE_PARSER( char* aLine, wxString aSource );
PCB_CALCULATOR_DATAFILE_PARSER( char* aLine, const wxString& aSource );
LINE_READER* GetReader() { return reader; };
void Parse( PCB_CALCULATOR_DATAFILE* aDataList );
void ParseRegulatorDescr( PCB_CALCULATOR_DATAFILE* aDataList );

View File

@ -76,7 +76,7 @@ int ACTION_PLUGINS::GetActionMenu( int aIndex )
}
ACTION_PLUGIN* ACTION_PLUGINS::GetAction( wxString aName )
ACTION_PLUGIN* ACTION_PLUGINS::GetAction( const wxString& aName )
{
int max = GetActionsCount();

View File

@ -127,7 +127,7 @@ public:
* @param aName is the action plugin name
* @return a action object by it's name or NULL if it isn't available.
*/
static ACTION_PLUGIN* GetAction( wxString aName );
static ACTION_PLUGIN* GetAction( const wxString& aName );
/**
* Function SetActionMenu

View File

@ -198,7 +198,7 @@ void BOARD_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
}
int BOARD_ITEM::getTrailingInt( wxString aStr )
int BOARD_ITEM::getTrailingInt( const wxString& aStr )
{
int number = 0;
int base = 1;

View File

@ -50,7 +50,7 @@ FOOTPRINT_WIZARD* FOOTPRINT_WIZARDS::GetWizard( int aIndex )
}
FOOTPRINT_WIZARD* FOOTPRINT_WIZARDS::GetWizard( wxString aName )
FOOTPRINT_WIZARD* FOOTPRINT_WIZARDS::GetWizard( const wxString& aName )
{
int max = GetWizardsCount();

View File

@ -204,7 +204,7 @@ public:
* @param aName is the footprint wizard name
* @return a wizard object by it's name or NULL if it isn't available.
*/
static FOOTPRINT_WIZARD* GetWizard( wxString aName );
static FOOTPRINT_WIZARD* GetWizard( const wxString& aName );
/**
* Function GetWizard

View File

@ -850,7 +850,7 @@ EDA_ITEM* MODULE::Clone() const
}
void MODULE::RunOnChildren( std::function<void (BOARD_ITEM*)> aFunction )
void MODULE::RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction )
{
try
{

View File

@ -589,7 +589,7 @@ public:
* Invokes a function on all BOARD_ITEMs that belong to the module (pads, drawings, texts).
* @param aFunction is the function to be invoked.
*/
void RunOnChildren( std::function<void (BOARD_ITEM*)> aFunction );
void RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction );
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;

View File

@ -99,7 +99,7 @@ NETCLASSES::~NETCLASSES()
}
bool NETCLASSES::Add( NETCLASSPTR aNetClass )
bool NETCLASSES::Add( const NETCLASSPTR& aNetClass )
{
const wxString& name = aNetClass->GetName();

View File

@ -284,7 +284,7 @@ public:
* @return true if the name within aNetclass is unique and it could be inserted OK,
* else false because the name was not unique.
*/
bool Add( NETCLASSPTR aNetclass );
bool Add( const NETCLASSPTR& aNetclass );
/**
* Function Remove

View File

@ -117,7 +117,7 @@ public:
* Function SetClass
* sets \a aNetclass into this NET
*/
void SetClass( NETCLASSPTR aNetClass );
void SetClass( const NETCLASSPTR& aNetClass );
NETCLASSPTR GetNetClass()
{

View File

@ -78,7 +78,7 @@ void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel,
}
void NETINFO_ITEM::SetClass( NETCLASSPTR aNetClass )
void NETINFO_ITEM::SetClass( const NETCLASSPTR& aNetClass )
{
wxCHECK( m_parent, /* void */ );
m_NetClass = aNetClass ? aNetClass : m_parent->GetDesignSettings().m_NetClasses.GetDefault();

View File

@ -617,7 +617,7 @@ static bool parallelismTest( int dx1, int dy1, int dx2, int dy2 )
* else return NULL
*/
static void updateConn( TRACK *track, std::shared_ptr<CONNECTIVITY_DATA> connectivity )
static void updateConn( TRACK *track, const std::shared_ptr<CONNECTIVITY_DATA>& connectivity )
{
for( auto pad : connectivity->GetConnectedPads( track ) )
{

View File

@ -34,7 +34,7 @@
using namespace std::placeholders;
bool operator<( const CN_ANCHOR_PTR a, const CN_ANCHOR_PTR b )
bool operator<( const CN_ANCHOR_PTR& a, const CN_ANCHOR_PTR& b )
{
if( a->Pos().x == b->Pos().x )
return a->Pos().y < b->Pos().y;
@ -1033,35 +1033,35 @@ void CN_CONNECTIVITY_ALGO::Clear()
}
void CN_CONNECTIVITY_ALGO::ForEachItem( std::function<void(CN_ITEM*)> aFunc )
void CN_CONNECTIVITY_ALGO::ForEachItem( const std::function<void( CN_ITEM& )>& aFunc )
{
for( auto item : m_padList )
aFunc( item );
aFunc( *item );
for( auto item : m_viaList )
aFunc( item );
aFunc( *item );
for( auto item : m_trackList )
aFunc( item );
aFunc( *item );
for( auto item : m_zoneList )
aFunc( item );
aFunc( *item );
}
void CN_CONNECTIVITY_ALGO::ForEachAnchor( std::function<void(CN_ANCHOR_PTR)> aFunc )
void CN_CONNECTIVITY_ALGO::ForEachAnchor( const std::function<void( CN_ANCHOR& )>& aFunc )
{
for( auto anchor : m_padList.Anchors() )
aFunc( anchor );
aFunc( *anchor );
for( auto anchor : m_viaList.Anchors() )
aFunc( anchor );
aFunc( *anchor );
for( auto anchor : m_trackList.Anchors() )
aFunc( anchor );
aFunc( *anchor );
for( auto anchor : m_zoneList.Anchors() )
aFunc( anchor );
aFunc( *anchor );
}

View File

@ -896,14 +896,14 @@ public:
CN_PAD_LIST& PadList() { return m_padList; }
void ForEachAnchor( std::function<void(CN_ANCHOR_PTR)> aFunc );
void ForEachItem( std::function<void(CN_ITEM*)> aFunc );
void ForEachAnchor( const std::function<void( CN_ANCHOR& )>& aFunc );
void ForEachItem( const std::function<void( CN_ITEM& )>& aFunc );
void MarkNetAsDirty( int aNet );
void SetProgressReporter( PROGRESS_REPORTER* aReporter );
};
bool operator<( const CN_ANCHOR_PTR a, const CN_ANCHOR_PTR b );
bool operator<( const CN_ANCHOR_PTR& a, const CN_ANCHOR_PTR& b );
#endif

View File

@ -122,7 +122,7 @@ void CONNECTIVITY_DATA::updateRatsnest()
}
void CONNECTIVITY_DATA::addRatsnestCluster( std::shared_ptr<CN_CLUSTER> aCluster )
void CONNECTIVITY_DATA::addRatsnestCluster( const std::shared_ptr<CN_CLUSTER>& aCluster )
{
auto rnNet = m_nets[ aCluster->OriginNet() ];
@ -281,7 +281,7 @@ void CONNECTIVITY_DATA::ComputeDynamicRatsnest( const std::vector<BOARD_ITEM*>&
void CONNECTIVITY_DATA::ClearDynamicRatsnest()
{
m_connAlgo->ForEachAnchor( [] (CN_ANCHOR_PTR anchor ) { anchor->SetNoLine( false ); } );
m_connAlgo->ForEachAnchor( [] ( CN_ANCHOR& anchor ) { anchor.SetNoLine( false ); } );
HideDynamicRatsnest();
}
@ -359,11 +359,11 @@ const std::vector<BOARD_CONNECTED_ITEM*> CONNECTIVITY_DATA::GetNetItems( int aNe
std::set<BOARD_CONNECTED_ITEM*> items;
std::vector<BOARD_CONNECTED_ITEM*> rv;
m_connAlgo->ForEachItem( [&items, aNetCode, &aTypes] ( CN_ITEM* aItem )
m_connAlgo->ForEachItem( [&items, aNetCode, &aTypes] ( CN_ITEM& aItem )
{
if( aItem->Valid() && aItem->Net() == aNetCode )
if( aItem.Valid() && ( aItem.Net() == aNetCode ) )
{
KICAD_T itemType = aItem->Parent()->Type();
KICAD_T itemType = aItem.Parent()->Type();
for( int i = 0; aTypes[i] > 0; ++i )
{
@ -371,7 +371,7 @@ const std::vector<BOARD_CONNECTED_ITEM*> CONNECTIVITY_DATA::GetNetItems( int aNe
if( itemType == aTypes[i] )
{
items.insert( aItem->Parent() );
items.insert( aItem.Parent() );
break;
}
}

View File

@ -230,7 +230,7 @@ public:
private:
void updateRatsnest();
void addRatsnestCluster( std::shared_ptr<CN_CLUSTER> aCluster );
void addRatsnestCluster( const std::shared_ptr<CN_CLUSTER>& aCluster );
std::unique_ptr<CONNECTIVITY_DATA> m_dynamicConnectivity;
std::shared_ptr<CN_CONNECTIVITY_ALGO> m_connAlgo;

View File

@ -265,7 +265,7 @@ static bool validateNumberingTypeAndOffset( const wxTextCtrl& offsetEntry,
*/
static bool validateLongEntry( const wxTextEntry& entry,
long& dest,
const wxString description,
const wxString& description,
wxArrayString& errors )
{
bool ok = true;

View File

@ -473,7 +473,7 @@ void DIALOG_DESIGN_RULES::InitializeRulesSelectionBoxes()
/* Initialize the rules list from board
*/
static void class2gridRow( wxGrid* grid, int row, NETCLASSPTR nc )
static void class2gridRow( wxGrid* grid, int row, const NETCLASSPTR& nc )
{
wxString msg;
@ -532,7 +532,7 @@ void DIALOG_DESIGN_RULES::InitRulesList()
}
static void gridRow2class( wxGrid* grid, int row, NETCLASSPTR nc )
static void gridRow2class( wxGrid* grid, int row, const NETCLASSPTR& nc )
{
#define MYCELL( col ) \
ValueFromString( g_UserUnit, grid->GetCellValue( row, col ) )

View File

@ -501,7 +501,7 @@ void DRC::updatePointers()
}
bool DRC::doNetClass( NETCLASSPTR nc, wxString& msg )
bool DRC::doNetClass( const NETCLASSPTR& nc, wxString& msg )
{
bool ret = true;

View File

@ -305,7 +305,7 @@ private:
//-----<single "item" tests>-----------------------------------------
bool doNetClass( std::shared_ptr<NETCLASS> aNetClass, wxString& msg );
bool doNetClass( const std::shared_ptr<NETCLASS>& aNetClass, wxString& msg );
/**
* Function doPadToPadsDrc

View File

@ -66,7 +66,7 @@ void FOOTPRINT_INFO_IMPL::load()
}
bool FOOTPRINT_LIST_IMPL::CatchErrors( std::function<void()> aFunc )
bool FOOTPRINT_LIST_IMPL::CatchErrors( const std::function<void()>& aFunc )
{
try
{

View File

@ -68,7 +68,7 @@ class FOOTPRINT_LIST_IMPL : public FOOTPRINT_LIST
*
* @return true if no error occurred.
*/
bool CatchErrors( std::function<void()> aFunc );
bool CatchErrors( const std::function<void()>& aFunc );
protected:
virtual void StartWorkers( FP_LIB_TABLE* aTable, wxString const* aNickname,

View File

@ -32,6 +32,7 @@
#include <ki_mutex.h>
#include <boost/bind.hpp>
#include <utility>
#include <make_unique.h>
#include <class_colors_design_settings.h>
@ -103,7 +104,7 @@ class FP_THREAD_IFACE
void SetCurrentFootprint( LIB_ID aFp )
{
MUTLOCK lock( m_lock );
m_current_fp = aFp;
m_current_fp = std::move( aFp );
}
/**

View File

@ -109,7 +109,7 @@ XNODE* FindPinMap( XNODE* aNode )
}
double StrToDoublePrecisionUnits( wxString aStr, char aAxe, wxString aActualConversion )
double StrToDoublePrecisionUnits( const wxString& aStr, char aAxe, const wxString& aActualConversion )
{
wxString ls;
double i;
@ -168,13 +168,13 @@ double StrToDoublePrecisionUnits( wxString aStr, char aAxe, wxString aActualConv
}
int StrToIntUnits( wxString aStr, char aAxe, wxString aActualConversion )
int StrToIntUnits( const wxString& aStr, char aAxe, const wxString& aActualConversion )
{
return KiROUND( StrToDoublePrecisionUnits( aStr, aAxe, aActualConversion ) );
}
wxString GetAndCutWordWithMeasureUnits( wxString* aStr, wxString aDefaultMeasurementUnit )
wxString GetAndCutWordWithMeasureUnits( wxString* aStr, const wxString& aDefaultMeasurementUnit )
{
wxString result;
@ -213,7 +213,7 @@ wxString GetAndCutWordWithMeasureUnits( wxString* aStr, wxString aDefaultMeasure
}
int StrToInt1Units( wxString aStr )
int StrToInt1Units( const wxString& aStr )
{
double num, precision = 10;
@ -245,9 +245,9 @@ wxString ValidateReference( wxString aRef )
void SetWidth( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
int* aWidth,
wxString aActualConversion )
const wxString& aActualConversion )
{
*aWidth = StrToIntUnits( GetAndCutWordWithMeasureUnits( &aStr,
aDefaultMeasurementUnit ), wxT( ' ' ),
@ -256,9 +256,9 @@ void SetWidth( wxString aStr,
void SetHeight( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
int* aHeight,
wxString aActualConversion )
const wxString& aActualConversion )
{
*aHeight = StrToIntUnits( GetAndCutWordWithMeasureUnits( &aStr,
aDefaultMeasurementUnit ), wxT( ' ' ),
@ -267,10 +267,10 @@ void SetHeight( wxString aStr,
void SetPosition( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
int* aX,
int* aY,
wxString aActualConversion )
const wxString& aActualConversion )
{
*aX = StrToIntUnits( GetAndCutWordWithMeasureUnits( &aStr,
aDefaultMeasurementUnit ), wxT( 'X' ),
@ -282,10 +282,10 @@ void SetPosition( wxString aStr,
void SetDoublePrecisionPosition( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
double* aX,
double* aY,
wxString aActualConversion )
const wxString& aActualConversion )
{
*aX = StrToDoublePrecisionUnits( GetAndCutWordWithMeasureUnits( &aStr,
aDefaultMeasurementUnit ), wxT( 'X' ),
@ -296,7 +296,7 @@ void SetDoublePrecisionPosition( wxString aStr,
}
TTEXT_JUSTIFY GetJustifyIdentificator( wxString aJustify )
TTEXT_JUSTIFY GetJustifyIdentificator( const wxString& aJustify )
{
TTEXT_JUSTIFY id;
@ -325,8 +325,8 @@ TTEXT_JUSTIFY GetJustifyIdentificator( wxString aJustify )
void SetTextParameters( XNODE* aNode,
TTEXTVALUE* aTextValue,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* tNode;
wxString str;
@ -379,8 +379,8 @@ void SetTextParameters( XNODE* aNode,
void SetFontProperty( XNODE* aNode,
TTEXTVALUE* aTextValue,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
wxString n, propValue;
@ -558,7 +558,7 @@ void SetTextSizeFromTrueTypeFontHeight( EDA_TEXT* aText, int aTextHeight )
}
XNODE* FindNode( XNODE* aChild, wxString aTag )
XNODE* FindNode( XNODE* aChild, const wxString& aTag )
{
aChild = aChild->GetChildren();
@ -573,7 +573,7 @@ XNODE* FindNode( XNODE* aChild, wxString aTag )
return NULL;
}
wxString FindNodeGetContent( XNODE* aChild, wxString aTag )
wxString FindNodeGetContent( XNODE* aChild, const wxString& aTag )
{
wxString str = wxEmptyString;

View File

@ -69,43 +69,42 @@ typedef struct _TTEXTVALUE
extern wxString GetWord( wxString* aStr );
extern XNODE* FindPinMap( XNODE* aNode );
extern int StrToIntUnits( wxString aStr, char aAxe, wxString aActualConversion );
extern int StrToIntUnits( const wxString& aStr, char aAxe, const wxString& aActualConversion );
extern wxString GetAndCutWordWithMeasureUnits( wxString* aStr,
wxString aDefaultMeasurementUnit );
extern int StrToInt1Units( wxString aStr );
const wxString& aDefaultMeasurementUnit );
extern int StrToInt1Units( const wxString& aStr );
extern wxString ValidateName( wxString aName );
extern wxString ValidateReference( wxString aRef );
extern void SetWidth( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
int* aWidth,
wxString aActualConversion );
const wxString& aActualConversion );
extern void SetPosition( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
int* aX,
int* aY,
wxString aActualConversion );
const wxString& aActualConversion );
extern void SetDoublePrecisionPosition( wxString aStr,
wxString aDefaultMeasurementUnit,
const wxString& aDefaultMeasurementUnit,
double* aX,
double* aY,
wxString aActualConversion );
extern TTEXT_JUSTIFY GetJustifyIdentificator( wxString aJustify );
const wxString& aActualConversion );
extern TTEXT_JUSTIFY GetJustifyIdentificator( const wxString& aJustify );
extern void SetTextParameters( XNODE* aNode,
TTEXTVALUE* aTextValue,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
extern void SetFontProperty( XNODE* aNode,
TTEXTVALUE* aTextValue,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
extern void SetTextJustify( EDA_TEXT* aText, TTEXT_JUSTIFY aJustify );
extern int CalculateTextLengthSize( TTEXTVALUE* aText );
extern void CorrectTextPosition( TTEXTVALUE* aValue );
extern void SetTextSizeFromStrokeFontHeight( EDA_TEXT* aText,
int aTextHeight );
extern void SetTextSizeFromStrokeFontHeight( EDA_TEXT* aText, int aTextHeight );
extern void SetTextSizeFromTrueTypeFontHeight( EDA_TEXT* aText, int aTextHeight );
extern XNODE* FindNode( XNODE* aChild, wxString aTag );
extern wxString FindNodeGetContent( XNODE* aChild, wxString aTag );
extern XNODE* FindNode( XNODE* aChild, const wxString& aTag );
extern wxString FindNodeGetContent( XNODE* aChild, const wxString& aTag );
extern void InitTTextValue( TTEXTVALUE* aTextValue );
} // namespace PCAD2KICAD

View File

@ -133,7 +133,7 @@ int PCB::GetNetCode( wxString aNetName )
return 0;
}
XNODE* PCB::FindCompDefName( XNODE* aNode, wxString aName )
XNODE* PCB::FindCompDefName( XNODE* aNode, const wxString& aName )
{
XNODE* result = NULL, * lNode;
wxString propValue;
@ -162,8 +162,9 @@ XNODE* PCB::FindCompDefName( XNODE* aNode, wxString aName )
void PCB::SetTextProperty( XNODE* aNode, TTEXTVALUE* aTextValue,
wxString aPatGraphRefName, wxString aXmlName,
wxString aActualConversion )
const wxString& aPatGraphRefName,
const wxString& aXmlName,
const wxString& aActualConversion )
{
XNODE* tNode, * t1Node;
wxString n, nnew, pn, propValue, str;
@ -233,7 +234,7 @@ void PCB::SetTextProperty( XNODE* aNode, TTEXTVALUE* aTextValue,
void PCB::DoPCBComponents( XNODE* aNode,
wxXmlDocument* aXmlDoc,
wxString aActualConversion,
const wxString& aActualConversion,
wxStatusBar* aStatusBar )
{
XNODE* lNode, * tNode, * mNode;
@ -420,7 +421,9 @@ void PCB::DoPCBComponents( XNODE* aNode,
}
void PCB::ConnectPinToNet( wxString aCompRef, wxString aPinRef, wxString aNetName )
void PCB::ConnectPinToNet( const wxString& aCompRef,
const wxString& aPinRef,
const wxString& aNetName )
{
PCB_MODULE* module;
PCB_PAD* cp;
@ -447,7 +450,7 @@ void PCB::ConnectPinToNet( wxString aCompRef, wxString aPinRef, wxString aNetNam
}
int PCB::FindLayer( wxString aLayerName )
int PCB::FindLayer( const wxString& aLayerName )
{
for( LAYER_NUM i = 0; i < (int)m_layersStackup.GetCount(); ++i )
{
@ -575,7 +578,7 @@ double PCB::GetDistance( wxRealPoint* aPoint1, wxRealPoint* aPoint2 )
( aPoint1->y - aPoint2->y ) );
}
void PCB::GetBoardOutline( wxXmlDocument* aXmlDoc, wxString aActualConversion )
void PCB::GetBoardOutline( wxXmlDocument* aXmlDoc, const wxString& aActualConversion )
{
XNODE* iNode, *lNode, *pNode;
long PCadLayer = 0;
@ -666,7 +669,7 @@ void PCB::GetBoardOutline( wxXmlDocument* aXmlDoc, wxString aActualConversion )
}
}
void PCB::ParseBoard( wxStatusBar* aStatusBar, wxXmlDocument* aXmlDoc, wxString aActualConversion )
void PCB::ParseBoard( wxStatusBar* aStatusBar, wxXmlDocument* aXmlDoc, const wxString& aActualConversion )
{
XNODE* aNode;//, *aaNode;
PCB_NET* net;

View File

@ -61,7 +61,7 @@ public:
void ParseBoard( wxStatusBar* aStatusBar,
wxXmlDocument* aXmlDoc,
wxString aActualConversion );
const wxString& aActualConversion );
void AddToBoard() override;
@ -69,22 +69,25 @@ private:
int m_timestamp_cnt;
wxArrayString m_layersStackup;
XNODE* FindCompDefName( XNODE* aNode, wxString aName );
XNODE* FindCompDefName( XNODE* aNode, const wxString& aName );
void SetTextProperty( XNODE* aNode,
TTEXTVALUE* aTextValue,
wxString aPatGraphRefName,
wxString aXmlName,
wxString aActualConversion );
const wxString& aPatGraphRefName,
const wxString& aXmlName,
const wxString& aActualConversion );
void DoPCBComponents( XNODE* aNode,
wxXmlDocument* aXmlDoc,
wxString aActualConversion,
const wxString& aActualConversion,
wxStatusBar* aStatusBar );
void ConnectPinToNet( wxString aCr, wxString aPr, wxString aNetName );
int FindLayer( wxString aLayerName );
void ConnectPinToNet( const wxString& aCr,
const wxString& aPr,
const wxString& aNetName );
int FindLayer( const wxString& aLayerName );
void MapLayer( XNODE* aNode );
int FindOutlinePoint( VERTICES_ARRAY* aOutline, wxRealPoint aPoint );
double GetDistance( wxRealPoint* aPoint1, wxRealPoint* aPoint2 );
void GetBoardOutline( wxXmlDocument* aXmlDoc, wxString aActualConversion );
void GetBoardOutline( wxXmlDocument* aXmlDoc,
const wxString& aActualConversion );
};
} // namespace PCAD2KICAD

View File

@ -54,8 +54,8 @@ PCB_ARC::~PCB_ARC()
void PCB_ARC::Parse( XNODE* aNode,
int aLayer,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
double a = 0.0;

View File

@ -47,8 +47,10 @@ public:
PCB_ARC( PCB_CALLBACKS* aCallbacks, BOARD* aBoard );
~PCB_ARC();
virtual void Parse( XNODE* aNode, int aLayer,
wxString aDefaultMeasurementUnit, wxString aActualConversion );
virtual void Parse( XNODE* aNode,
int aLayer,
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
virtual void SetPosOffset( int aX_offs, int aY_offs ) override;
virtual void Flip() override;

View File

@ -51,8 +51,8 @@ PCB_COPPER_POUR::~PCB_COPPER_POUR()
bool PCB_COPPER_POUR::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
wxString pourType, str, propValue;

View File

@ -44,8 +44,8 @@ public:
~PCB_COPPER_POUR();
virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion ) override;
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion ) override;
};
} // namespace PCAD2KICAD

View File

@ -47,8 +47,8 @@ PCB_CUTOUT::~PCB_CUTOUT()
bool PCB_CUTOUT::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;

View File

@ -44,8 +44,8 @@ public:
~PCB_CUTOUT();
virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion ) override;
const wxString& aDefaultMeasurementUnit,
const wxString& actualConversion ) override;
};
} // namespace PCAD2KICAD

View File

@ -50,8 +50,8 @@ PCB_KEEPOUT::~PCB_KEEPOUT()
bool PCB_KEEPOUT::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;

View File

@ -43,8 +43,8 @@ public:
~PCB_KEEPOUT();
virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion ) override;
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion ) override;
};
} // namespace PCAD2KICAD

View File

@ -53,8 +53,8 @@ PCB_LINE::~PCB_LINE()
void PCB_LINE::Parse( XNODE* aNode,
int aLayer,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
wxString propValue;

View File

@ -49,8 +49,8 @@ public:
virtual void Parse( XNODE* aNode,
int aLayer,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
virtual void SetPosOffset( int aX_offs, int aY_offs ) override;
virtual void Flip() override;
void AddToModule( MODULE* aModule ) override;

View File

@ -68,7 +68,7 @@ PCB_MODULE::~PCB_MODULE()
}
XNODE* PCB_MODULE::FindModulePatternDefName( XNODE* aNode, wxString aName )
XNODE* PCB_MODULE::FindModulePatternDefName( XNODE* aNode, const wxString& aName )
{
XNODE* result, * lNode;
wxString propValue1, propValue2;
@ -218,8 +218,8 @@ void PCB_MODULE::DoLayerContentsObjects( XNODE* aNode,
PCB_MODULE* aPCBModule,
PCB_COMPONENTS_ARRAY* aList,
wxStatusBar* aStatusBar,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
PCB_ARC* arc;
PCB_POLYGON* polygon;
@ -369,7 +369,7 @@ void PCB_MODULE::DoLayerContentsObjects( XNODE* aNode,
}
void PCB_MODULE::SetName( wxString aPin, wxString aName )
void PCB_MODULE::SetName( const wxString& aPin, const wxString& aName )
{
int i;
long num;
@ -388,7 +388,8 @@ void PCB_MODULE::SetName( wxString aPin, wxString aName )
void PCB_MODULE::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
wxString aDefaultMeasurementUnit, wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode, * tNode, * mNode;
PCB_PAD* pad;

View File

@ -48,19 +48,20 @@ public:
PCB_MODULE( PCB_CALLBACKS* aCallbacks, BOARD* aBoard );
~PCB_MODULE();
XNODE* FindModulePatternDefName( XNODE* aNode, wxString aName );
XNODE* FindModulePatternDefName( XNODE* aNode, const wxString& aName );
void DoLayerContentsObjects( XNODE* aNode,
PCB_MODULE* aPCBModule,
PCB_COMPONENTS_ARRAY* aList,
wxStatusBar* aStatusBar,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
void SetName( wxString aPin, wxString aName );
void SetName( const wxString& aPin, const wxString& aName );
virtual void Parse( XNODE* aNode, wxStatusBar* aStatusBar,
wxString aDefaultMeasurementUnit, wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
virtual void Flip() override;
void AddToBoard() override;

View File

@ -56,8 +56,9 @@ PCB_PAD::~PCB_PAD()
}
void PCB_PAD::Parse( XNODE* aNode, wxString aDefaultMeasurementUnit,
wxString aActualConversion )
void PCB_PAD::Parse( XNODE* aNode,
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode, *cNode;
long num;

View File

@ -49,8 +49,8 @@ public:
~PCB_PAD();
virtual void Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
virtual void Flip() override;
void AddToModule( MODULE* aModule ) override
{

View File

@ -51,8 +51,8 @@ PCB_PAD_SHAPE::~PCB_PAD_SHAPE()
void PCB_PAD_SHAPE::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
wxString str, s;
long num;

View File

@ -48,8 +48,8 @@ public:
~PCB_PAD_SHAPE();
virtual void Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
void AddToBoard() override;
};

View File

@ -50,8 +50,8 @@ PCB_PLANE::~PCB_PLANE()
bool PCB_PLANE::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
wxString pourType, str, propValue;

View File

@ -43,8 +43,8 @@ public:
~PCB_PLANE();
virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion ) override;
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion ) override;
};
} // namespace PCAD2KICAD

View File

@ -79,7 +79,7 @@ PCB_POLYGON::~PCB_POLYGON()
}
}
void PCB_POLYGON::AssignNet( wxString aNetName )
void PCB_POLYGON::AssignNet( const wxString& aNetName )
{
m_net = aNetName;
m_netCode = GetNetCode( m_net );
@ -102,7 +102,8 @@ void PCB_POLYGON::SetOutline( VERTICES_ARRAY* aOutline )
}
void PCB_POLYGON::FormPolygon( XNODE* aNode, VERTICES_ARRAY* aPolygon,
wxString aDefaultMeasurementUnit, wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
double x, y;
@ -124,8 +125,8 @@ void PCB_POLYGON::FormPolygon( XNODE* aNode, VERTICES_ARRAY* aPolygon,
bool PCB_POLYGON::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
wxString propValue;

View File

@ -52,8 +52,8 @@ public:
~PCB_POLYGON();
virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
virtual void SetPosOffset( int aX_offs, int aY_offs ) override;
virtual void Flip() override;
@ -61,11 +61,12 @@ public:
void AddToBoard() override;
// protected:
void AssignNet( wxString aNetName );
void AssignNet( const wxString& aNetName );
void SetOutline( VERTICES_ARRAY* aOutline );
void FormPolygon( XNODE* aNode, VERTICES_ARRAY* aPolygon,
wxString aDefaultMeasurementUnit, wxString actualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& actualConversion );
protected:
bool m_filled;
};

View File

@ -50,8 +50,8 @@ PCB_TEXT::~PCB_TEXT()
void PCB_TEXT::Parse( XNODE* aNode,
int aLayer,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
wxString str;

View File

@ -46,8 +46,8 @@ public:
virtual void Parse( XNODE* aNode,
int aLayer,
wxString aDefaultMeasurementUnit,
wxString aActualConversion );
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion );
void AddToModule( MODULE* aModule ) override;
void AddToBoard() override;

View File

@ -46,8 +46,9 @@ PCB_VIA::~PCB_VIA()
}
void PCB_VIA::Parse( XNODE* aNode, wxString aDefaultMeasurementUnit,
wxString aActualConversion )
void PCB_VIA::Parse( XNODE* aNode,
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode, * tNode;
wxString propValue;

View File

@ -45,8 +45,8 @@ public:
~PCB_VIA();
virtual void Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion ) override;
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion ) override;
};
} // namespace PCAD2KICAD

View File

@ -48,8 +48,8 @@ PCB_VIA_SHAPE::~PCB_VIA_SHAPE()
void PCB_VIA_SHAPE::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion )
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion )
{
XNODE* lNode;
wxString str;

View File

@ -43,8 +43,8 @@ public:
~PCB_VIA_SHAPE();
virtual void Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit,
wxString aActualConversion ) override;
const wxString& aDefaultMeasurementUnit,
const wxString& aActualConversion ) override;
};
} // namespace PCAD2KICAD

Some files were not shown because too many files have changed in this diff Show More