From f049b01a59ac69aa08008215a2a0f2a0c652b481 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 19 Jun 2017 15:43:25 +0200 Subject: [PATCH] Eagle plugin: Added 'static' and 'const T&' as applicable --- common/eagle_parser.cpp | 2 +- eeschema/sch_eagle_plugin.cpp | 4 ++-- eeschema/sch_eagle_plugin.h | 5 +++-- include/eagle_parser.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/eagle_parser.cpp b/common/eagle_parser.cpp index 2a352799cf..b962321c33 100644 --- a/common/eagle_parser.cpp +++ b/common/eagle_parser.cpp @@ -195,7 +195,7 @@ EJUNCTION::EJUNCTION( wxXmlNode* aJunction) y = parseRequiredAttribute( aJunction, "y" ); } -ELABEL::ELABEL( wxXmlNode* aLabel, wxString aNetName) +ELABEL::ELABEL( wxXmlNode* aLabel, const wxString& aNetName ) { /* diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index 7dc8b57a14..f46f93e600 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -50,7 +50,7 @@ constexpr double EUNIT_TO_MIL = 1000.0 / 25.4; using namespace std; -NODE_MAP mapChildren( wxXmlNode* aCurrentNode ) +static NODE_MAP mapChildren( wxXmlNode* aCurrentNode ) { // Map node_name -> node_pointer NODE_MAP nodesMap; @@ -71,7 +71,7 @@ NODE_MAP mapChildren( wxXmlNode* aCurrentNode ) return nodesMap; } -int countChildren( wxXmlNode* aCurrentNode, std::string name) +static int countChildren( wxXmlNode* aCurrentNode, const std::string& aName ) { // Map node_name -> node_pointer int count = 0; diff --git a/eeschema/sch_eagle_plugin.h b/eeschema/sch_eagle_plugin.h index 01c6b6582b..415dfd3a60 100644 --- a/eeschema/sch_eagle_plugin.h +++ b/eeschema/sch_eagle_plugin.h @@ -117,9 +117,10 @@ private: void loadModuleinst( wxXmlNode* aModuleinstNode ); void loadLibrary( wxXmlNode* aLibraryNode ); - void loadSegments( wxXmlNode* aSegmentsNode, wxString aNetName, wxString aNetClass ); + void loadSegments( wxXmlNode* aSegmentsNode, const wxString& aNetName, + const wxString& aNetClass ); SCH_LINE* loadSignalWire( wxXmlNode* aWireNode ); - SCH_GLOBALLABEL* loadLabel( wxXmlNode* aLabelNode, wxString aNetName ); + SCH_GLOBALLABEL* loadLabel( wxXmlNode* aLabelNode, const wxString& aNetName ); SCH_JUNCTION* loadJunction( wxXmlNode* aJunction ); LIB_PART* loadSymbol( wxXmlNode* aSymbolNode ); diff --git a/include/eagle_parser.h b/include/eagle_parser.h index 016475e13c..91aef28734 100644 --- a/include/eagle_parser.h +++ b/include/eagle_parser.h @@ -448,7 +448,7 @@ struct ELABEL wxString netname; - ELABEL( wxXmlNode* aLabel, wxString aNetName ); + ELABEL( wxXmlNode* aLabel, const wxString& aNetName ); };