Merge lp:~p12/kicad/remove-uses-namespace-std into lp:kicad/product

Proposed by Povilas Kanapickas
Status: Merged
Merge reported by: Dick Hollenbeck
Merged at revision: not available
Proposed branch: lp:~p12/kicad/remove-uses-namespace-std
Merge into: lp:kicad/product
Diff against target: 1780 lines (+184/-244)
47 files modified
CMakeModules/PerformFeatureChecks.cmake (+1/-1)
common/geometry/shape_line_chain.cpp (+4/-5)
common/gr_basic.cpp (+2/-2)
common/tool/tool_event.cpp (+1/-3)
common/tool/tool_manager.cpp (+0/-1)
eeschema/annotate.cpp (+1/-2)
eeschema/component_references_lister.cpp (+1/-1)
eeschema/hierarch.cpp (+1/-1)
eeschema/sch_bus_entry.cpp (+1/-1)
eeschema/sch_bus_entry.h (+1/-1)
eeschema/sch_component.cpp (+2/-2)
eeschema/sch_component.h (+2/-2)
eeschema/sch_junction.cpp (+1/-1)
eeschema/sch_junction.h (+1/-1)
eeschema/sch_line.cpp (+1/-1)
eeschema/sch_line.h (+3/-3)
eeschema/sch_no_connect.cpp (+1/-1)
eeschema/sch_no_connect.h (+1/-1)
eeschema/sch_sheet.cpp (+1/-1)
eeschema/sch_sheet.h (+1/-1)
eeschema/sch_text.cpp (+1/-1)
eeschema/sch_text.h (+1/-1)
include/sch_item_struct.h (+4/-7)
include/tool/examples/coroutine_example.cpp (+0/-2)
include/tool/examples/delegate_example.cpp (+0/-2)
kicad/dialogs/dialog_template_selector.h (+1/-1)
kicad/project_template.cpp (+4/-6)
kicad/project_template.h (+1/-4)
new/sch_dir_lib_source.cpp (+0/-3)
new/sch_lib_table.cpp (+0/-1)
pcbnew/eagle_plugin.cpp (+64/-65)
pcbnew/github/github_plugin.cpp (+13/-18)
pcbnew/gpcb_plugin.cpp (+8/-11)
pcbnew/kicad_plugin.cpp (+1/-4)
pcbnew/legacy_plugin.cpp (+13/-16)
pcbnew/pcb_parser.cpp (+13/-17)
pcbnew/router/pns_line.cpp (+2/-3)
pcbnew/router/pns_line_placer.cpp (+1/-3)
pcbnew/router/pns_node.cpp (+7/-9)
pcbnew/router/pns_optimizer.cpp (+3/-5)
pcbnew/router/pns_router.cpp (+5/-7)
pcbnew/router/pns_shove.cpp (+2/-4)
pcbnew/router/pns_walkaround.cpp (+0/-4)
pcbnew/router/router_tool.cpp (+0/-1)
polygon/SutherlandHodgmanClipPoly.h (+7/-8)
polygon/poly2tri/common/shapes.cc (+6/-7)
scripting/kicad.i (+0/-2)
To merge this branch: bzr merge lp:~p12/kicad/remove-uses-namespace-std
Reviewer Review Type Date Requested Status
KiCad Lead Developers Pending
Review via email: mp+197657@code.launchpad.net

Description of the change

Remove uses of using namespace std.

To post a comment you must log in.
Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

I wish we had added this text to the coding standards:

**************************

  The project should never use 'using namespace ...' in a header file, but using
  it in a *.cpp file is OK, according to the author of the *.cpp file's preference.
  If it occurs in a *.cpp file, it must occur after any #include statements.

**************************

The consequences of that make it impossible not to use std:: for all STL objects which
present themselves in a header file. This is the public API.

The above policy also gives the implementation author the freedom of brevity in a file which is not affecting usage of the API in (client callaing) *.cpp files.

I personally have followed this policy in everything I've contributed, never once put a "using namespace" into a header file. I was not aware that we had strayed from this common sense approach.

So I only like about 25% of this patch, because for my *.cpp files, I really don't care to see them be changed in a way other than I wrote them for something other than a bug. Of course, this is an understatement.

It is general, not limited to me. It is respectful of the original author's wishes, the person who we often call upon to *support* the code when something goes wrong.

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

The negotiated result was that we are to add these lines to the Coding Standards document:

  The project should never use 'using namespace ...' in a header file, but using
  it in a *.cpp file is OK, according to the author of the *.cpp file's preference.
  If it occurs in a *.cpp file, it must occur after any #include statements.

(Wayne agreed to do that.)

Then I consulted authors/developers who have made use of 'using namespace' in *.cpp files, which is still legal, to find out what they were willing to give up. The applied patch is a result of this process, and it is a subset of the original request.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeModules/PerformFeatureChecks.cmake'
--- CMakeModules/PerformFeatureChecks.cmake 2013-10-03 22:53:42 +0000
+++ CMakeModules/PerformFeatureChecks.cmake 2013-12-04 08:51:30 +0000
@@ -92,7 +92,7 @@
9292
93 # CMakes check_cxx_symbol_exists() doesn't work for templates so we must create a93 # CMakes check_cxx_symbol_exists() doesn't work for templates so we must create a
94 # small program to verify isinf() exists in cmath.94 # small program to verify isinf() exists in cmath.
95 check_cxx_source_compiles( "#include <cmath>\nusing namespace std;\nint main(int argc, char** argv)\n{\n (void)argv;\n isinf(1.0); (void)argc;\n return 0;\n}\n" HAVE_CMATH_ISINF )95 check_cxx_source_compiles( "#include <cmath>\nint main(int argc, char** argv)\n{\n (void)argv;\n std::isinf(1.0); (void)argc;\n return 0;\n}\n" HAVE_CMATH_ISINF )
9696
97 #check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME) non-standard library, does not work97 #check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME) non-standard library, does not work
98 check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)98 check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)
9999
=== modified file 'common/geometry/shape_line_chain.cpp'
--- common/geometry/shape_line_chain.cpp 2013-10-14 18:40:36 +0000
+++ common/geometry/shape_line_chain.cpp 2013-12-04 08:51:30 +0000
@@ -25,7 +25,6 @@
25#include <geometry/shape_line_chain.h>25#include <geometry/shape_line_chain.h>
26#include <geometry/shape_circle.h>26#include <geometry/shape_circle.h>
2727
28using namespace std;
29using boost::optional;28using boost::optional;
3029
31bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const30bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const
@@ -137,7 +136,7 @@
137 int d = INT_MAX;136 int d = INT_MAX;
138137
139 for( int s = 0; s < SegmentCount(); s++ )138 for( int s = 0; s < SegmentCount(); s++ )
140 d = min( d, CSegment( s ).Distance( aP ) );139 d = std::min( d, CSegment( s ).Distance( aP ) );
141140
142 return d;141 return d;
143}142}
@@ -437,7 +436,7 @@
437436
438SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify()437SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify()
439{438{
440 vector<VECTOR2I> pts_unique;439 std::vector<VECTOR2I> pts_unique;
441440
442 if( PointCount() < 2 )441 if( PointCount() < 2 )
443 {442 {
@@ -524,9 +523,9 @@
524}523}
525524
526525
527const string SHAPE_LINE_CHAIN::Format() const526const std::string SHAPE_LINE_CHAIN::Format() const
528{527{
529 stringstream ss;528 std::stringstream ss;
530529
531 ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " ";530 ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " ";
532531
533532
=== modified file 'common/gr_basic.cpp'
--- common/gr_basic.cpp 2013-09-11 09:11:27 +0000
+++ common/gr_basic.cpp 2013-12-04 08:51:30 +0000
@@ -1358,8 +1358,8 @@
1358 }1358 }
13591359
1360 // A clip box exists: clip and draw the polygon.1360 // A clip box exists: clip and draw the polygon.
1361 static vector<wxPoint> clippedPolygon;1361 static std::vector<wxPoint> clippedPolygon;
1362 static pointVector inputPolygon, outputPolygon;1362 static pointVector inputPolygon, outputPolygon;
13631363
1364 inputPolygon.clear();1364 inputPolygon.clear();
1365 outputPolygon.clear();1365 outputPolygon.clear();
13661366
=== modified file 'common/tool/tool_event.cpp'
--- common/tool/tool_event.cpp 2013-10-15 08:41:00 +0000
+++ common/tool/tool_event.cpp 2013-12-04 08:51:30 +0000
@@ -31,8 +31,6 @@
3131
32#include <boost/foreach.hpp>32#include <boost/foreach.hpp>
3333
34using namespace std;
35
36struct FlagString34struct FlagString
37{35{
38 int flag;36 int flag;
@@ -153,7 +151,7 @@
153151
154const std::string TOOL_EVENT_LIST::Format() const152const std::string TOOL_EVENT_LIST::Format() const
155{153{
156 string s;154 std::string s;
157155
158 BOOST_FOREACH( TOOL_EVENT e, m_events )156 BOOST_FOREACH( TOOL_EVENT e, m_events )
159 s += e.Format() + " ";157 s += e.Format() + " ";
160158
=== modified file 'common/tool/tool_manager.cpp'
--- common/tool/tool_manager.cpp 2013-11-13 19:59:47 +0000
+++ common/tool/tool_manager.cpp 2013-12-04 08:51:30 +0000
@@ -47,7 +47,6 @@
47#include <class_drawpanel_gal.h>47#include <class_drawpanel_gal.h>
4848
49using boost::optional;49using boost::optional;
50using namespace std;
5150
52/// Struct describing the current execution state of a TOOL51/// Struct describing the current execution state of a TOOL
53struct TOOL_MANAGER::TOOL_STATE52struct TOOL_MANAGER::TOOL_STATE
5453
=== modified file 'eeschema/annotate.cpp'
--- eeschema/annotate.cpp 2013-07-03 07:27:52 +0000
+++ eeschema/annotate.cpp 2013-12-04 08:51:30 +0000
@@ -26,8 +26,7 @@
26 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA26 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27 */27 */
2828
29#include <algorithm> // to use sort vector29#include <algorithm>
30#include <vector>
3130
32#include <fctsys.h>31#include <fctsys.h>
33#include <class_drawpanel.h>32#include <class_drawpanel.h>
3433
=== modified file 'eeschema/component_references_lister.cpp'
--- eeschema/component_references_lister.cpp 2013-06-14 14:59:52 +0000
+++ eeschema/component_references_lister.cpp 2013-12-04 08:51:30 +0000
@@ -30,7 +30,7 @@
3030
3131
32#include <wx/regex.h>32#include <wx/regex.h>
33#include <algorithm> // to use sort vector33#include <algorithm>
34#include <vector>34#include <vector>
3535
36#include <fctsys.h>36#include <fctsys.h>
3737
=== modified file 'eeschema/hierarch.cpp'
--- eeschema/hierarch.cpp 2013-11-15 09:28:31 +0000
+++ eeschema/hierarch.cpp 2013-12-04 08:51:30 +0000
@@ -169,7 +169,7 @@
169169
170 // Set dialog window size to be large enough170 // Set dialog window size to be large enough
171 m_TreeSize.x = itemrect.GetWidth() + 20;171 m_TreeSize.x = itemrect.GetWidth() + 20;
172 m_TreeSize.x = max( m_TreeSize.x, 250 );172 m_TreeSize.x = std::max( m_TreeSize.x, 250 );
173173
174 // Readjust the size of the frame to an optimal value.174 // Readjust the size of the frame to an optimal value.
175 m_TreeSize.y = m_nbsheets * itemrect.GetHeight();175 m_TreeSize.y = m_nbsheets * itemrect.GetHeight();
176176
=== modified file 'eeschema/sch_bus_entry.cpp'
--- eeschema/sch_bus_entry.cpp 2013-11-24 17:48:14 +0000
+++ eeschema/sch_bus_entry.cpp 2013-12-04 08:51:30 +0000
@@ -246,7 +246,7 @@
246}246}
247247
248248
249void SCH_BUS_ENTRY_BASE::GetConnectionPoints( vector< wxPoint >& aPoints ) const249void SCH_BUS_ENTRY_BASE::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
250{250{
251 aPoints.push_back( m_pos );251 aPoints.push_back( m_pos );
252 aPoints.push_back( m_End() );252 aPoints.push_back( m_End() );
253253
=== modified file 'eeschema/sch_bus_entry.h'
--- eeschema/sch_bus_entry.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_bus_entry.h 2013-12-04 08:51:30 +0000
@@ -96,7 +96,7 @@
9696
97 bool IsConnectable() const { return true; }97 bool IsConnectable() const { return true; }
9898
99 void GetConnectionPoints( vector< wxPoint >& aPoints ) const;99 void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const;
100100
101 BITMAP_DEF GetMenuImage() const { return add_entry_xpm; }101 BITMAP_DEF GetMenuImage() const { return add_entry_xpm; }
102102
103103
=== modified file 'eeschema/sch_component.cpp'
--- eeschema/sch_component.cpp 2013-11-26 09:15:20 +0000
+++ eeschema/sch_component.cpp 2013-12-04 08:51:30 +0000
@@ -1605,7 +1605,7 @@
1605}1605}
16061606
16071607
1608void SCH_COMPONENT::GetConnectionPoints( vector< wxPoint >& aPoints ) const1608void SCH_COMPONENT::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
1609{1609{
1610 LIB_PIN* pin;1610 LIB_PIN* pin;
1611 LIB_COMPONENT* component = CMP_LIBRARY::FindLibraryComponent( m_ChipName );1611 LIB_COMPONENT* component = CMP_LIBRARY::FindLibraryComponent( m_ChipName );
@@ -1876,7 +1876,7 @@
18761876
1877bool SCH_COMPONENT::doIsConnected( const wxPoint& aPosition ) const1877bool SCH_COMPONENT::doIsConnected( const wxPoint& aPosition ) const
1878{1878{
1879 vector< wxPoint > pts;1879 std::vector< wxPoint > pts;
18801880
1881 GetConnectionPoints( pts );1881 GetConnectionPoints( pts );
18821882
18831883
=== modified file 'eeschema/sch_component.h'
--- eeschema/sch_component.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_component.h 2013-12-04 08:51:30 +0000
@@ -357,7 +357,7 @@
357357
358 bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );358 bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );
359359
360 void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList );360 void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList );
361361
362 wxPoint GetPinPhysicalPosition( LIB_PIN* Pin );362 wxPoint GetPinPhysicalPosition( LIB_PIN* Pin );
363363
@@ -372,7 +372,7 @@
372 */372 */
373 bool IsInNetlist() const;373 bool IsInNetlist() const;
374374
375 void GetConnectionPoints( vector< wxPoint >& aPoints ) const;375 void GetConnectionPoints( std::vector<wxPoint>& aPoints ) const;
376376
377 SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,377 SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
378 const KICAD_T scanTypes[] );378 const KICAD_T scanTypes[] );
379379
=== modified file 'eeschema/sch_junction.cpp'
--- eeschema/sch_junction.cpp 2013-11-24 17:48:14 +0000
+++ eeschema/sch_junction.cpp 2013-12-04 08:51:30 +0000
@@ -168,7 +168,7 @@
168}168}
169169
170170
171void SCH_JUNCTION::GetConnectionPoints( vector< wxPoint >& aPoints ) const171void SCH_JUNCTION::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
172{172{
173 aPoints.push_back( m_pos );173 aPoints.push_back( m_pos );
174}174}
175175
=== modified file 'eeschema/sch_junction.h'
--- eeschema/sch_junction.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_junction.h 2013-12-04 08:51:30 +0000
@@ -81,7 +81,7 @@
8181
82 bool IsConnectable() const { return true; }82 bool IsConnectable() const { return true; }
8383
84 void GetConnectionPoints( vector< wxPoint >& aPoints ) const;84 void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const;
8585
86 wxString GetSelectMenuText() const { return wxString( _( "Junction" ) ); }86 wxString GetSelectMenuText() const { return wxString( _( "Junction" ) ); }
8787
8888
=== modified file 'eeschema/sch_line.cpp'
--- eeschema/sch_line.cpp 2013-11-24 17:48:14 +0000
+++ eeschema/sch_line.cpp 2013-12-04 08:51:30 +0000
@@ -461,7 +461,7 @@
461}461}
462462
463463
464void SCH_LINE::GetConnectionPoints( vector< wxPoint >& aPoints ) const464void SCH_LINE::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
465{465{
466 aPoints.push_back( m_start );466 aPoints.push_back( m_start );
467 aPoints.push_back( m_end );467 aPoints.push_back( m_end );
468468
=== modified file 'eeschema/sch_line.h'
--- eeschema/sch_line.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_line.h 2013-12-04 08:51:30 +0000
@@ -113,9 +113,9 @@
113 */113 */
114 bool MergeOverlap( SCH_LINE* aLine );114 bool MergeOverlap( SCH_LINE* aLine );
115115
116 void GetEndPoints( vector <DANGLING_END_ITEM>& aItemList );116 void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList );
117117
118 bool IsDanglingStateChanged( vector< DANGLING_END_ITEM >& aItemList );118 bool IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemList );
119119
120 bool IsDangling() const { return m_startIsDangling || m_endIsDangling; }120 bool IsDangling() const { return m_startIsDangling || m_endIsDangling; }
121121
@@ -123,7 +123,7 @@
123123
124 bool IsConnectable() const;124 bool IsConnectable() const;
125125
126 void GetConnectionPoints( vector< wxPoint >& aPoints ) const;126 void GetConnectionPoints(std::vector< wxPoint >& aPoints ) const;
127127
128 wxString GetSelectMenuText() const;128 wxString GetSelectMenuText() const;
129129
130130
=== modified file 'eeschema/sch_no_connect.cpp'
--- eeschema/sch_no_connect.cpp 2013-11-24 17:48:14 +0000
+++ eeschema/sch_no_connect.cpp 2013-12-04 08:51:30 +0000
@@ -182,7 +182,7 @@
182}182}
183183
184184
185void SCH_NO_CONNECT::GetConnectionPoints( vector< wxPoint >& aPoints ) const185void SCH_NO_CONNECT::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
186{186{
187 aPoints.push_back( m_pos );187 aPoints.push_back( m_pos );
188}188}
189189
=== modified file 'eeschema/sch_no_connect.h'
--- eeschema/sch_no_connect.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_no_connect.h 2013-12-04 08:51:30 +0000
@@ -81,7 +81,7 @@
8181
82 bool IsConnectable() const { return true; }82 bool IsConnectable() const { return true; }
8383
84 void GetConnectionPoints( vector< wxPoint >& aPoints ) const;84 void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const;
8585
86 wxString GetSelectMenuText() const { return wxString( _( "No Connect" ) ); }86 wxString GetSelectMenuText() const { return wxString( _( "No Connect" ) ); }
8787
8888
=== modified file 'eeschema/sch_sheet.cpp'
--- eeschema/sch_sheet.cpp 2013-11-24 17:48:14 +0000
+++ eeschema/sch_sheet.cpp 2013-12-04 08:51:30 +0000
@@ -1000,7 +1000,7 @@
1000}1000}
10011001
10021002
1003void SCH_SHEET::GetConnectionPoints( vector< wxPoint >& aPoints ) const1003void SCH_SHEET::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
1004{1004{
1005 for( size_t i = 0; i < GetPins().size(); i++ )1005 for( size_t i = 0; i < GetPins().size(); i++ )
1006 aPoints.push_back( GetPins()[i].GetPosition() );1006 aPoints.push_back( GetPins()[i].GetPosition() );
10071007
=== modified file 'eeschema/sch_sheet.h'
--- eeschema/sch_sheet.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_sheet.h 2013-12-04 08:51:30 +0000
@@ -533,7 +533,7 @@
533533
534 bool IsConnectable() const { return true; }534 bool IsConnectable() const { return true; }
535535
536 void GetConnectionPoints( vector< wxPoint >& aPoints ) const;536 void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const;
537537
538 SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,538 SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData,
539 const KICAD_T scanTypes[] );539 const KICAD_T scanTypes[] );
540540
=== modified file 'eeschema/sch_text.cpp'
--- eeschema/sch_text.cpp 2013-11-29 08:13:43 +0000
+++ eeschema/sch_text.cpp 2013-12-04 08:51:30 +0000
@@ -564,7 +564,7 @@
564}564}
565565
566566
567void SCH_TEXT::GetConnectionPoints( vector< wxPoint >& aPoints ) const567void SCH_TEXT::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
568{568{
569 // Normal text labels do not have connection points. All others do.569 // Normal text labels do not have connection points. All others do.
570 if( Type() == SCH_TEXT_T )570 if( Type() == SCH_TEXT_T )
571571
=== modified file 'eeschema/sch_text.h'
--- eeschema/sch_text.h 2013-11-24 17:48:14 +0000
+++ eeschema/sch_text.h 2013-12-04 08:51:30 +0000
@@ -189,7 +189,7 @@
189189
190 virtual bool IsSelectStateChanged( const wxRect& aRect );190 virtual bool IsSelectStateChanged( const wxRect& aRect );
191191
192 virtual void GetConnectionPoints( vector< wxPoint >& aPoints ) const;192 virtual void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const;
193193
194 virtual bool CanIncrementLabel() const { return true; }194 virtual bool CanIncrementLabel() const { return true; }
195195
196196
=== modified file 'include/sch_item_struct.h'
--- include/sch_item_struct.h 2013-10-27 18:21:53 +0000
+++ include/sch_item_struct.h 2013-12-04 08:51:30 +0000
@@ -34,9 +34,6 @@
34#include <class_base_screen.h>34#include <class_base_screen.h>
35#include <general.h>35#include <general.h>
3636
37using namespace std;
38
39
40class SCH_ITEM;37class SCH_ITEM;
41class SCH_SHEET_PATH;38class SCH_SHEET_PATH;
42class LINE_READER;39class LINE_READER;
@@ -49,7 +46,7 @@
4946
50typedef boost::ptr_vector< SCH_ITEM > SCH_ITEMS;47typedef boost::ptr_vector< SCH_ITEM > SCH_ITEMS;
51typedef SCH_ITEMS::iterator SCH_ITEMS_ITR;48typedef SCH_ITEMS::iterator SCH_ITEMS_ITR;
52typedef vector< SCH_ITEMS_ITR > SCH_ITEMS_ITRS;49typedef std::vector< SCH_ITEMS_ITR > SCH_ITEMS_ITRS;
5350
5451
55#define FMT_IU SCH_ITEM::FormatInternalUnits52#define FMT_IU SCH_ITEM::FormatInternalUnits
@@ -228,7 +225,7 @@
228 *225 *
229 * @param aItemList - List of DANGLING_END_ITEMS to add to.226 * @param aItemList - List of DANGLING_END_ITEMS to add to.
230 */227 */
231 virtual void GetEndPoints( vector< DANGLING_END_ITEM >& aItemList ) {}228 virtual void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList ) {}
232229
233 /**230 /**
234 * Function IsDanglingStateChanged231 * Function IsDanglingStateChanged
@@ -243,7 +240,7 @@
243 * @param aItemList - List of items to test item against.240 * @param aItemList - List of items to test item against.
244 * @return True if the dangling state has changed from it's current setting.241 * @return True if the dangling state has changed from it's current setting.
245 */242 */
246 virtual bool IsDanglingStateChanged( vector< DANGLING_END_ITEM >& aItemList ) { return false; }243 virtual bool IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemList ) { return false; }
247244
248 virtual bool IsDangling() const { return false; }245 virtual bool IsDangling() const { return false; }
249246
@@ -273,7 +270,7 @@
273 *270 *
274 * @param aPoints List of connection points to add to.271 * @param aPoints List of connection points to add to.
275 */272 */
276 virtual void GetConnectionPoints( vector< wxPoint >& aPoints ) const { }273 virtual void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const { }
277274
278 /**275 /**
279 * Function ClearConnections276 * Function ClearConnections
280277
=== modified file 'include/tool/examples/coroutine_example.cpp'
--- include/tool/examples/coroutine_example.cpp 2013-10-14 14:13:35 +0000
+++ include/tool/examples/coroutine_example.cpp 2013-12-04 08:51:30 +0000
@@ -3,8 +3,6 @@
33
4#include <tool/coroutine.h>4#include <tool/coroutine.h>
55
6using namespace std;
7
8typedef COROUTINE<int, int> MyCoroutine;6typedef COROUTINE<int, int> MyCoroutine;
97
10class MyClass8class MyClass
119
=== modified file 'include/tool/examples/delegate_example.cpp'
--- include/tool/examples/delegate_example.cpp 2013-10-14 14:13:35 +0000
+++ include/tool/examples/delegate_example.cpp 2013-12-04 08:51:30 +0000
@@ -3,8 +3,6 @@
33
4#include <tool/delegate.h>4#include <tool/delegate.h>
55
6using namespace std;
7
8class MyClass6class MyClass
9{7{
10public:8public:
119
=== modified file 'kicad/dialogs/dialog_template_selector.h'
--- kicad/dialogs/dialog_template_selector.h 2013-06-13 16:09:35 +0000
+++ kicad/dialogs/dialog_template_selector.h 2013-12-04 08:51:30 +0000
@@ -79,7 +79,7 @@
79class DIALOG_TEMPLATE_SELECTOR : public DIALOG_TEMPLATE_SELECTOR_BASE79class DIALOG_TEMPLATE_SELECTOR : public DIALOG_TEMPLATE_SELECTOR_BASE
80{80{
81protected:81protected:
82 vector<TEMPLATE_SELECTION_PANEL*> m_panels;82 std::vector<TEMPLATE_SELECTION_PANEL*> m_panels;
83 void AddTemplate( int aPage, PROJECT_TEMPLATE* aTemplate );83 void AddTemplate( int aPage, PROJECT_TEMPLATE* aTemplate );
84 TEMPLATE_WIDGET* m_selectedWidget;84 TEMPLATE_WIDGET* m_selectedWidget;
8585
8686
=== modified file 'kicad/project_template.cpp'
--- kicad/project_template.cpp 2013-05-26 04:36:44 +0000
+++ kicad/project_template.cpp 2013-12-04 08:51:30 +0000
@@ -33,8 +33,6 @@
33#include <wx/txtstrm.h>33#include <wx/txtstrm.h>
34#include <wx/wfstream.h>34#include <wx/wfstream.h>
3535
36using namespace std;
37
38#define SEP() wxFileName::GetPathSeparator()36#define SEP() wxFileName::GetPathSeparator()
3937
4038
@@ -71,9 +69,9 @@
71 metaIcon = new wxBitmap( templateMetaIconFile.GetFullPath(), wxBITMAP_TYPE_PNG );69 metaIcon = new wxBitmap( templateMetaIconFile.GetFullPath(), wxBITMAP_TYPE_PNG );
72}70}
7371
74vector<wxFileName> PROJECT_TEMPLATE::GetFileList()72std::vector<wxFileName> PROJECT_TEMPLATE::GetFileList()
75{73{
76 vector<wxFileName> files;74 std::vector<wxFileName> files;
77 wxString f = templateBasePath.GetPath();75 wxString f = templateBasePath.GetPath();
78 wxArrayString allfiles;76 wxArrayString allfiles;
79 wxFileName p;77 wxFileName p;
@@ -122,8 +120,8 @@
122{120{
123 bool result = true;121 bool result = true;
124122
125 vector<wxFileName> srcFiles = GetFileList();123 std::vector<wxFileName> srcFiles = GetFileList();
126 vector<wxFileName> dstFiles;124 std::vector<wxFileName> dstFiles;
127125
128 for( size_t i=0; i < srcFiles.size(); i++ )126 for( size_t i=0; i < srcFiles.size(); i++ )
129 {127 {
130128
=== modified file 'kicad/project_template.h'
--- kicad/project_template.h 2013-06-13 16:09:35 +0000
+++ kicad/project_template.h 2013-12-04 08:51:30 +0000
@@ -110,9 +110,6 @@
110#include <wx/image.h>110#include <wx/image.h>
111#include <wx/filename.h>111#include <wx/filename.h>
112112
113using namespace std;
114
115
116/**113/**
117 * @brief A directory which contains information about the project template and does not get114 * @brief A directory which contains information about the project template and does not get
118 * copied. This define is the default filename for this directory115 * copied. This define is the default filename for this directory
@@ -200,7 +197,7 @@
200 * @brief Get a vector list of filenames for the template. The files are the source files,197 * @brief Get a vector list of filenames for the template. The files are the source files,
201 * and have not yet been through any renaming198 * and have not yet been through any renaming
202 */199 */
203 vector<wxFileName> GetFileList();200 std::vector<wxFileName> GetFileList();
204};201};
205202
206#endif203#endif
207204
=== modified file 'new/sch_dir_lib_source.cpp'
--- new/sch_dir_lib_source.cpp 2011-11-04 15:53:37 +0000
+++ new/sch_dir_lib_source.cpp 2013-12-04 08:51:30 +0000
@@ -52,9 +52,6 @@
52#include <errno.h>52#include <errno.h>
53#include <assert.h>53#include <assert.h>
5454
55#include <vector>
56using namespace std;
57
58#include <sch_dir_lib_source.h>55#include <sch_dir_lib_source.h>
59using namespace SCH;56using namespace SCH;
6057
6158
=== modified file 'new/sch_lib_table.cpp'
--- new/sch_lib_table.cpp 2012-11-15 16:04:10 +0000
+++ new/sch_lib_table.cpp 2013-12-04 08:51:30 +0000
@@ -31,7 +31,6 @@
31#include <sch_dir_lib_source.h>31#include <sch_dir_lib_source.h>
3232
3333
34//using namespace std; // screws up Doxygen
35using namespace SCH;34using namespace SCH;
36using namespace LT; // tokens, enum T for LIB_TABLE35using namespace LT; // tokens, enum T for LIB_TABLE
3736
3837
=== modified file 'pcbnew/eagle_plugin.cpp'
--- pcbnew/eagle_plugin.cpp 2013-11-29 18:29:41 +0000
+++ pcbnew/eagle_plugin.cpp 2013-12-04 08:51:30 +0000
@@ -77,7 +77,6 @@
77#include <class_pcb_text.h>77#include <class_pcb_text.h>
7878
79using namespace boost::property_tree;79using namespace boost::property_tree;
80using namespace std;
8180
82typedef EAGLE_PLUGIN::BIU BIU;81typedef EAGLE_PLUGIN::BIU BIU;
83typedef PTREE::const_assoc_iterator CA_ITER;82typedef PTREE::const_assoc_iterator CA_ITER;
@@ -87,7 +86,7 @@
87typedef MODULE_MAP::iterator MODULE_ITER;86typedef MODULE_MAP::iterator MODULE_ITER;
88typedef MODULE_MAP::const_iterator MODULE_CITER;87typedef MODULE_MAP::const_iterator MODULE_CITER;
8988
90typedef boost::optional<string> opt_string;89typedef boost::optional<std::string> opt_string;
91typedef boost::optional<int> opt_int;90typedef boost::optional<int> opt_int;
92typedef boost::optional<double> opt_double;91typedef boost::optional<double> opt_double;
93typedef boost::optional<bool> opt_bool;92typedef boost::optional<bool> opt_bool;
@@ -151,11 +150,11 @@
151 }150 }
152151
153 /// return the contents of the XPATH as a single string152 /// return the contents of the XPATH as a single string
154 string Contents()153 std::string Contents()
155 {154 {
156 typedef std::vector<TRIPLET>::const_iterator CITER;155 typedef std::vector<TRIPLET>::const_iterator CITER;
157156
158 string ret;157 std::string ret;
159158
160 for( CITER it = p.begin(); it != p.end(); ++it )159 for( CITER it = p.begin(); it != p.end(); ++it )
161 {160 {
@@ -187,7 +186,7 @@
187static opt_bool parseOptionalBool( CPTREE& attribs, const char* aName )186static opt_bool parseOptionalBool( CPTREE& attribs, const char* aName )
188{187{
189 opt_bool ret;188 opt_bool ret;
190 opt_string stemp = attribs.get_optional<string>( aName );189 opt_string stemp = attribs.get_optional<std::string>( aName );
191190
192 if( stemp )191 if( stemp )
193 ret = !stemp->compare( "yes" );192 ret = !stemp->compare( "yes" );
@@ -227,7 +226,7 @@
227226
228/// parse an Eagle XML "rot" field. Unfortunately the DTD seems not to explain227/// parse an Eagle XML "rot" field. Unfortunately the DTD seems not to explain
229/// this format very well. [S][M]R<degrees>. Examples: "R90", "MR180", "SR180"228/// this format very well. [S][M]R<degrees>. Examples: "R90", "MR180", "SR180"
230static EROT erot( const string& aRot )229static EROT erot( const std::string& aRot )
231{230{
232 EROT rot;231 EROT rot;
233232
@@ -245,7 +244,7 @@
245static opt_erot parseOptionalEROT( CPTREE& attribs )244static opt_erot parseOptionalEROT( CPTREE& attribs )
246{245{
247 opt_erot ret;246 opt_erot ret;
248 opt_string stemp = attribs.get_optional<string>( "rot" );247 opt_string stemp = attribs.get_optional<std::string>( "rot" );
249 if( stemp )248 if( stemp )
250 ret = erot( *stemp );249 ret = erot( *stemp );
251 return ret;250 return ret;
@@ -316,7 +315,7 @@
316315
317 curve = attribs.get_optional<double>( "curve" );316 curve = attribs.get_optional<double>( "curve" );
318317
319 opt_string s = attribs.get_optional<string>( "style" );318 opt_string s = attribs.get_optional<std::string>( "style" );
320 if( s )319 if( s )
321 {320 {
322 if( !s->compare( "continuous" ) )321 if( !s->compare( "continuous" ) )
@@ -329,7 +328,7 @@
329 style = EWIRE::DASHDOT;328 style = EWIRE::DASHDOT;
330 }329 }
331330
332 s = attribs.get_optional<string>( "cap" );331 s = attribs.get_optional<std::string>( "cap" );
333 if( s )332 if( s )
334 {333 {
335 if( !s->compare( "round" ) )334 if( !s->compare( "round" ) )
@@ -374,13 +373,13 @@
374 x = attribs.get<double>( "x" );373 x = attribs.get<double>( "x" );
375 y = attribs.get<double>( "y" );374 y = attribs.get<double>( "y" );
376375
377 string ext = attribs.get<string>( "extent" );376 std::string ext = attribs.get<std::string>( "extent" );
378377
379 sscanf( ext.c_str(), "%u-%u", &layer_front_most, &layer_back_most );378 sscanf( ext.c_str(), "%u-%u", &layer_front_most, &layer_back_most );
380379
381 drill = attribs.get<double>( "drill" );380 drill = attribs.get<double>( "drill" );
382 diam = attribs.get_optional<double>( "diameter" );381 diam = attribs.get_optional<double>( "diameter" );
383 shape = attribs.get_optional<string>( "shape" );382 shape = attribs.get_optional<std::string>( "shape" );
384}383}
385384
386385
@@ -460,7 +459,7 @@
460/// Eagle "attribute" XML element, no foolin'.459/// Eagle "attribute" XML element, no foolin'.
461struct EATTR460struct EATTR
462{461{
463 string name;462 std::string name;
464 opt_string value;463 opt_string value;
465 opt_double x;464 opt_double x;
466 opt_double y;465 opt_double y;
@@ -508,8 +507,8 @@
508 >507 >
509 */508 */
510509
511 name = attribs.get<string>( "name" ); // #REQUIRED510 name = attribs.get<std::string>( "name" ); // #REQUIRED
512 value = attribs.get_optional<string>( "value" );511 value = attribs.get_optional<std::string>( "value" );
513512
514 x = attribs.get_optional<double>( "x" );513 x = attribs.get_optional<double>( "x" );
515 y = attribs.get_optional<double>( "y" );514 y = attribs.get_optional<double>( "y" );
@@ -522,7 +521,7 @@
522 ratio = attribs.get_optional<double>( "ratio" );521 ratio = attribs.get_optional<double>( "ratio" );
523 rot = parseOptionalEROT( attribs );522 rot = parseOptionalEROT( attribs );
524523
525 opt_string stemp = attribs.get_optional<string>( "display" );524 opt_string stemp = attribs.get_optional<std::string>( "display" );
526 if( stemp )525 if( stemp )
527 {526 {
528 // (off | value | name | both)527 // (off | value | name | both)
@@ -541,7 +540,7 @@
541/// Eagle text element540/// Eagle text element
542struct ETEXT541struct ETEXT
543{542{
544 string text;543 std::string text;
545 double x;544 double x;
546 double y;545 double y;
547 double size;546 double size;
@@ -593,11 +592,11 @@
593 size = attribs.get<double>( "size" );592 size = attribs.get<double>( "size" );
594 layer = attribs.get<int>( "layer" );593 layer = attribs.get<int>( "layer" );
595594
596 font = attribs.get_optional<string>( "font" );595 font = attribs.get_optional<std::string>( "font" );
597 ratio = attribs.get_optional<double>( "ratio" );596 ratio = attribs.get_optional<double>( "ratio" );
598 rot = parseOptionalEROT( attribs );597 rot = parseOptionalEROT( attribs );
599598
600 opt_string stemp = attribs.get_optional<string>( "align" );599 opt_string stemp = attribs.get_optional<std::string>( "align" );
601 if( stemp )600 if( stemp )
602 {601 {
603 // (bottom-left | bottom-center | bottom-right | center-left |602 // (bottom-left | bottom-center | bottom-right | center-left |
@@ -627,7 +626,7 @@
627/// Eagle thru hol pad626/// Eagle thru hol pad
628struct EPAD627struct EPAD
629{628{
630 string name;629 std::string name;
631 double x;630 double x;
632 double y;631 double y;
633 double drill;632 double drill;
@@ -671,14 +670,14 @@
671 */670 */
672671
673 // #REQUIRED says DTD, throw exception if not found672 // #REQUIRED says DTD, throw exception if not found
674 name = attribs.get<string>( "name" );673 name = attribs.get<std::string>( "name" );
675 x = attribs.get<double>( "x" );674 x = attribs.get<double>( "x" );
676 y = attribs.get<double>( "y" );675 y = attribs.get<double>( "y" );
677 drill = attribs.get<double>( "drill" );676 drill = attribs.get<double>( "drill" );
678677
679 diameter = attribs.get_optional<double>( "diameter" );678 diameter = attribs.get_optional<double>( "diameter" );
680679
681 opt_string s = attribs.get_optional<string>( "shape" );680 opt_string s = attribs.get_optional<std::string>( "shape" );
682 if( s )681 if( s )
683 {682 {
684 // (square | round | octagon | long | offset)683 // (square | round | octagon | long | offset)
@@ -704,7 +703,7 @@
704/// Eagle SMD pad703/// Eagle SMD pad
705struct ESMD704struct ESMD
706{705{
707 string name;706 std::string name;
708 double x;707 double x;
709 double y;708 double y;
710 double dx;709 double dx;
@@ -740,7 +739,7 @@
740 */739 */
741740
742 // DTD #REQUIRED, throw exception if not found741 // DTD #REQUIRED, throw exception if not found
743 name = attribs.get<string>( "name" );742 name = attribs.get<std::string>( "name" );
744 x = attribs.get<double>( "x" );743 x = attribs.get<double>( "x" );
745 y = attribs.get<double>( "y" );744 y = attribs.get<double>( "y" );
746 dx = attribs.get<double>( "dx" );745 dx = attribs.get<double>( "dx" );
@@ -824,7 +823,7 @@
824 layer = attribs.get<int>( "layer" );823 layer = attribs.get<int>( "layer" );
825 spacing = attribs.get_optional<double>( "spacing" );824 spacing = attribs.get_optional<double>( "spacing" );
826825
827 opt_string s = attribs.get_optional<string>( "pour" );826 opt_string s = attribs.get_optional<std::string>( "pour" );
828 if( s )827 if( s )
829 {828 {
830 // (solid | hatch | cutout)829 // (solid | hatch | cutout)
@@ -874,10 +873,10 @@
874/// Eagle element element873/// Eagle element element
875struct EELEMENT874struct EELEMENT
876{875{
877 string name;876 std::string name;
878 string library;877 std::string library;
879 string package;878 std::string package;
880 string value;879 std::string value;
881 double x;880 double x;
882 double y;881 double y;
883 opt_bool locked;882 opt_bool locked;
@@ -907,11 +906,11 @@
907 */906 */
908907
909 // #REQUIRED908 // #REQUIRED
910 name = attribs.get<string>( "name" );909 name = attribs.get<std::string>( "name" );
911 library = attribs.get<string>( "library" );910 library = attribs.get<std::string>( "library" );
912 value = attribs.get<string>( "value" );911 value = attribs.get<std::string>( "value" );
913912
914 package = attribs.get<string>( "package" );913 package = attribs.get<std::string>( "package" );
915 ReplaceIllegalFileNameChars( &package );914 ReplaceIllegalFileNameChars( &package );
916915
917 x = attribs.get<double>( "x" );916 x = attribs.get<double>( "x" );
@@ -927,7 +926,7 @@
927struct ELAYER926struct ELAYER
928{927{
929 int number;928 int number;
930 string name;929 std::string name;
931 int color;930 int color;
932 int fill;931 int fill;
933 opt_bool visible;932 opt_bool visible;
@@ -953,7 +952,7 @@
953 */952 */
954953
955 number = attribs.get<int>( "number" );954 number = attribs.get<int>( "number" );
956 name = attribs.get<string>( "name" );955 name = attribs.get<std::string>( "name" );
957 color = attribs.get<int>( "color" );956 color = attribs.get<int>( "color" );
958 visible = parseOptionalBool( attribs, "visible" );957 visible = parseOptionalBool( attribs, "visible" );
959 active = parseOptionalBool( attribs, "active" );958 active = parseOptionalBool( attribs, "active" );
@@ -962,7 +961,7 @@
962961
963/// Parse an eagle distance which is either mm, or mils if there is "mil" suffix.962/// Parse an eagle distance which is either mm, or mils if there is "mil" suffix.
964/// Return is in BIU.963/// Return is in BIU.
965static double parseEagle( const string& aDistance )964static double parseEagle( const std::string& aDistance )
966{965{
967 double ret = strtod( aDistance.c_str(), NULL );966 double ret = strtod( aDistance.c_str(), NULL );
968 if( aDistance.npos != aDistance.find( "mil" ) )967 if( aDistance.npos != aDistance.find( "mil" ) )
@@ -1019,7 +1018,7 @@
10191018
1020 CPTREE& attribs = it->second.get_child( "<xmlattr>" );1019 CPTREE& attribs = it->second.get_child( "<xmlattr>" );
10211020
1022 const string& name = attribs.get<string>( "name" );1021 const std::string& name = attribs.get<std::string>( "name" );
10231022
1024 if( name == "psElongationLong" )1023 if( name == "psElongationLong" )
1025 psElongationLong = attribs.get<int>( "value" );1024 psElongationLong = attribs.get<int>( "value" );
@@ -1028,28 +1027,28 @@
1028 else if( name == "rvPadTop" )1027 else if( name == "rvPadTop" )
1029 rvPadTop = attribs.get<double>( "value" );1028 rvPadTop = attribs.get<double>( "value" );
1030 else if( name == "rlMinPadTop" )1029 else if( name == "rlMinPadTop" )
1031 rlMinPadTop = parseEagle( attribs.get<string>( "value" ) );1030 rlMinPadTop = parseEagle( attribs.get<std::string>( "value" ) );
1032 else if( name == "rlMaxPadTop" )1031 else if( name == "rlMaxPadTop" )
1033 rlMaxPadTop = parseEagle( attribs.get<string>( "value" ) );1032 rlMaxPadTop = parseEagle( attribs.get<std::string>( "value" ) );
10341033
1035 else if( name == "rvViaOuter" )1034 else if( name == "rvViaOuter" )
1036 rvViaOuter = attribs.get<double>( "value" );1035 rvViaOuter = attribs.get<double>( "value" );
1037 else if( name == "rlMinViaOuter" )1036 else if( name == "rlMinViaOuter" )
1038 rlMinViaOuter = parseEagle( attribs.get<string>( "value" ) );1037 rlMinViaOuter = parseEagle( attribs.get<std::string>( "value" ) );
1039 else if( name == "rlMaxViaOuter" )1038 else if( name == "rlMaxViaOuter" )
1040 rlMaxViaOuter = parseEagle( attribs.get<string>( "value" ) );1039 rlMaxViaOuter = parseEagle( attribs.get<std::string>( "value" ) );
1041 else if( name == "mdWireWire" )1040 else if( name == "mdWireWire" )
1042 mdWireWire = parseEagle( attribs.get<string>( "value" ) );1041 mdWireWire = parseEagle( attribs.get<std::string>( "value" ) );
1043 }1042 }
1044}1043}
10451044
10461045
1047/// Assemble a two part key as a simple concatonation of aFirst and aSecond parts,1046/// Assemble a two part key as a simple concatonation of aFirst and aSecond parts,
1048/// using a separator.1047/// using a separator.
1049static inline string makeKey( const string& aFirst, const string& aSecond )1048static inline std::string makeKey( const std::string& aFirst,
1049 const std::string& aSecond )
1050{1050{
1051 string key = aFirst + '\x02' + aSecond;1051 return (aFirst + '\x02' + aSecond);
1052 return key;
1053}1052}
10541053
10551054
@@ -1119,14 +1118,14 @@
1119 m_board->SetFileName( aFileName );1118 m_board->SetFileName( aFileName );
11201119
1121 // delete on exception, iff I own m_board, according to aAppendToMe1120 // delete on exception, iff I own m_board, according to aAppendToMe
1122 auto_ptr<BOARD> deleter( aAppendToMe ? NULL : m_board );1121 std::auto_ptr<BOARD> deleter( aAppendToMe ? NULL : m_board );
11231122
1124 try1123 try
1125 {1124 {
1126 // 8 bit "filename" should be encoded according to disk filename encoding,1125 // 8 bit "filename" should be encoded according to disk filename encoding,
1127 // (maybe this is current locale, maybe not, its a filesystem issue),1126 // (maybe this is current locale, maybe not, its a filesystem issue),
1128 // and is not necessarily utf8.1127 // and is not necessarily utf8.
1129 string filename = (const char*) aFileName.char_str( wxConvFile );1128 std::string filename = (const char*) aFileName.char_str( wxConvFile );
11301129
1131 read_xml( filename, doc, xml_parser::trim_whitespace | xml_parser::no_comments );1130 read_xml( filename, doc, xml_parser::trim_whitespace | xml_parser::no_comments );
11321131
@@ -1171,7 +1170,7 @@
1171 // so one catch should be OK for all errors.1170 // so one catch should be OK for all errors.
1172 catch( ptree_error pte )1171 catch( ptree_error pte )
1173 {1172 {
1174 string errmsg = pte.what();1173 std::string errmsg = pte.what();
11751174
1176 errmsg += " @\n";1175 errmsg += " @\n";
1177 errmsg += m_xpath->Contents();1176 errmsg += m_xpath->Contents();
@@ -1571,7 +1570,7 @@
1571}1570}
15721571
15731572
1574void EAGLE_PLUGIN::loadLibrary( CPTREE& aLib, const string* aLibName )1573void EAGLE_PLUGIN::loadLibrary( CPTREE& aLib, const std::string* aLibName )
1575{1574{
1576 m_xpath->push( "packages" );1575 m_xpath->push( "packages" );
15771576
@@ -1586,9 +1585,9 @@
1586 {1585 {
1587 m_xpath->push( "package", "name" );1586 m_xpath->push( "package", "name" );
15881587
1589 const string& pack_ref = package->second.get<string>( "<xmlattr>.name" );1588 const std::string& pack_ref = package->second.get<std::string>( "<xmlattr>.name" );
15901589
1591 string pack_name( pack_ref );1590 std::string pack_name( pack_ref );
15921591
1593 ReplaceIllegalFileNameChars( &pack_name );1592 ReplaceIllegalFileNameChars( &pack_name );
15941593
@@ -1601,7 +1600,7 @@
1601#endif1600#endif
1602 m_xpath->Value( pack_name.c_str() );1601 m_xpath->Value( pack_name.c_str() );
16031602
1604 string key = aLibName ? makeKey( *aLibName, pack_name ) : pack_name;1603 std::string key = aLibName ? makeKey( *aLibName, pack_name ) : pack_name;
16051604
1606 MODULE* m = makeModule( package->second, pack_name );1605 MODULE* m = makeModule( package->second, pack_name );
16071606
@@ -1636,7 +1635,7 @@
16361635
1637 for( CITER library = aLibs.begin(); library != aLibs.end(); ++library )1636 for( CITER library = aLibs.begin(); library != aLibs.end(); ++library )
1638 {1637 {
1639 const string& lib_name = library->second.get<string>( "<xmlattr>.name" );1638 const std::string& lib_name = library->second.get<std::string>( "<xmlattr>.name" );
16401639
1641 m_xpath->Value( lib_name.c_str() );1640 m_xpath->Value( lib_name.c_str() );
16421641
@@ -1667,7 +1666,7 @@
16671666
1668 m_xpath->Value( e.name.c_str() );1667 m_xpath->Value( e.name.c_str() );
16691668
1670 string key = makeKey( e.library, e.package );1669 std::string key = makeKey( e.library, e.package );
16711670
1672 MODULE_CITER mi = m_templates.find( key );1671 MODULE_CITER mi = m_templates.find( key );
16731672
@@ -1693,7 +1692,7 @@
1693 // update the nets within the pads of the clone1692 // update the nets within the pads of the clone
1694 for( D_PAD* pad = m->Pads(); pad; pad = pad->Next() )1693 for( D_PAD* pad = m->Pads(); pad; pad = pad->Next() )
1695 {1694 {
1696 string key = makeKey( e.name, TO_UTF8( pad->GetPadName() ) );1695 std::string key = makeKey( e.name, TO_UTF8( pad->GetPadName() ) );
16971696
1698 NET_MAP_CITER ni = m_pads_to_nets.find( key );1697 NET_MAP_CITER ni = m_pads_to_nets.find( key );
1699 if( ni != m_pads_to_nets.end() )1698 if( ni != m_pads_to_nets.end() )
@@ -1881,13 +1880,13 @@
1881}1880}
18821881
18831882
1884MODULE* EAGLE_PLUGIN::makeModule( CPTREE& aPackage, const string& aPkgName ) const1883MODULE* EAGLE_PLUGIN::makeModule( CPTREE& aPackage, const std::string& aPkgName ) const
1885{1884{
1886 std::auto_ptr<MODULE> m( new MODULE( NULL ) );1885 std::auto_ptr<MODULE> m( new MODULE( NULL ) );
18871886
1888 m->SetFPID( FPID( aPkgName ) );1887 m->SetFPID( FPID( aPkgName ) );
18891888
1890 opt_string description = aPackage.get_optional<string>( "description" );1889 opt_string description = aPackage.get_optional<std::string>( "description" );
1891 if( description )1890 if( description )
1892 m->SetDescription( FROM_UTF8( description->c_str() ) );1891 m->SetDescription( FROM_UTF8( description->c_str() ) );
18931892
@@ -2354,7 +2353,7 @@
23542353
2355 zones.clear();2354 zones.clear();
23562355
2357 const string& nname = net->second.get<string>( "<xmlattr>.name" );2356 const std::string& nname = net->second.get<std::string>( "<xmlattr>.name" );
2358 wxString netName = FROM_UTF8( nname.c_str() );2357 wxString netName = FROM_UTF8( nname.c_str() );
23592358
2360 m_xpath->Value( nname.c_str() );2359 m_xpath->Value( nname.c_str() );
@@ -2469,10 +2468,10 @@
2469 // <contactref element="RN1" pad="7"/>2468 // <contactref element="RN1" pad="7"/>
2470 CPTREE& attribs = it->second.get_child( "<xmlattr>" );2469 CPTREE& attribs = it->second.get_child( "<xmlattr>" );
24712470
2472 const string& reference = attribs.get<string>( "element" );2471 const std::string& reference = attribs.get<std::string>( "element" );
2473 const string& pad = attribs.get<string>( "pad" );2472 const std::string& pad = attribs.get<std::string>( "pad" );
24742473
2475 string key = makeKey( reference, pad ) ;2474 std::string key = makeKey( reference, pad ) ;
24762475
2477 // D(printf( "adding refname:'%s' pad:'%s' netcode:%d netname:'%s'\n", reference.c_str(), pad.c_str(), netCode, nname.c_str() );)2476 // D(printf( "adding refname:'%s' pad:'%s' netcode:%d netname:'%s'\n", reference.c_str(), pad.c_str(), netCode, nname.c_str() );)
24782477
@@ -2714,8 +2713,8 @@
2714{2713{
2715 if( m_props )2714 if( m_props )
2716 {2715 {
2717 string page_width;2716 std::string page_width;
2718 string page_height;2717 std::string page_height;
27192718
2720 if( m_props->Value( "page_width", &page_width ) &&2719 if( m_props->Value( "page_width", &page_width ) &&
2721 m_props->Value( "page_height", &page_height ) )2720 m_props->Value( "page_height", &page_height ) )
@@ -2785,7 +2784,7 @@
2785 // 8 bit "filename" should be encoded according to disk filename encoding,2784 // 8 bit "filename" should be encoded according to disk filename encoding,
2786 // (maybe this is current locale, maybe not, its a filesystem issue),2785 // (maybe this is current locale, maybe not, its a filesystem issue),
2787 // and is not necessarily utf8.2786 // and is not necessarily utf8.
2788 string filename = (const char*) aLibPath.char_str( wxConvFile );2787 std::string filename = (const char*) aLibPath.char_str( wxConvFile );
27892788
2790 read_xml( filename, doc, xml_parser::trim_whitespace | xml_parser::no_comments );2789 read_xml( filename, doc, xml_parser::trim_whitespace | xml_parser::no_comments );
27912790
@@ -2816,7 +2815,7 @@
2816 // so one catch should be OK for all errors.2815 // so one catch should be OK for all errors.
2817 catch( ptree_error pte )2816 catch( ptree_error pte )
2818 {2817 {
2819 string errmsg = pte.what();2818 std::string errmsg = pte.what();
28202819
2821 errmsg += " @\n";2820 errmsg += " @\n";
2822 errmsg += m_xpath->Contents();2821 errmsg += m_xpath->Contents();
@@ -2847,7 +2846,7 @@
28472846
2848 cacheLib( aLibraryPath );2847 cacheLib( aLibraryPath );
28492848
2850 string key = TO_UTF8( aFootprintName );2849 std::string key = TO_UTF8( aFootprintName );
28512850
2852 MODULE_CITER mi = m_templates.find( key );2851 MODULE_CITER mi = m_templates.find( key );
28532852
28542853
=== modified file 'pcbnew/github/github_plugin.cpp'
--- pcbnew/github/github_plugin.cpp 2013-12-03 18:37:21 +0000
+++ pcbnew/github/github_plugin.cpp 2013-12-04 08:51:30 +0000
@@ -63,15 +63,12 @@
63#include <macros.h>63#include <macros.h>
64#include <fp_lib_table.h> // ExpandSubstitutions()64#include <fp_lib_table.h> // ExpandSubstitutions()
6565
66using namespace std;
67
68
69static const char* PRETTY_DIR = "allow_pretty_writing_to_this_dir";66static const char* PRETTY_DIR = "allow_pretty_writing_to_this_dir";
7067
7168
72typedef boost::ptr_map<string, wxZipEntry> MODULE_MAP;69typedef boost::ptr_map<std::string, wxZipEntry> MODULE_MAP;
73typedef MODULE_MAP::iterator MODULE_ITER;70typedef MODULE_MAP::iterator MODULE_ITER;
74typedef MODULE_MAP::const_iterator MODULE_CITER;71typedef MODULE_MAP::const_iterator MODULE_CITER;
7572
7673
77/**74/**
@@ -166,7 +163,7 @@
166 }163 }
167 }164 }
168165
169 string fp_name = TO_UTF8( aFootprintName );166 std::string fp_name = TO_UTF8( aFootprintName );
170167
171 MODULE_CITER it = m_gh_cache->find( fp_name );168 MODULE_CITER it = m_gh_cache->find( fp_name );
172169
@@ -233,7 +230,7 @@
233 // IsFootprintLibWritable() to determine if calling FootprintSave() is230 // IsFootprintLibWritable() to determine if calling FootprintSave() is
234 // even legal, so I spend no time on internationalization here:231 // even legal, so I spend no time on internationalization here:
235232
236 string msg = StrPrintf( "Github library\n'%s'\nis only writable if you set option '%s' in Library Tables dialog.",233 std::string msg = StrPrintf( "Github library\n'%s'\nis only writable if you set option '%s' in Library Tables dialog.",
237 (const char*) TO_UTF8( aLibraryPath ), PRETTY_DIR );234 (const char*) TO_UTF8( aLibraryPath ), PRETTY_DIR );
238235
239 THROW_IO_ERROR( msg );236 THROW_IO_ERROR( msg );
@@ -275,7 +272,7 @@
275 // IsFootprintLibWritable() to determine if calling FootprintSave() is272 // IsFootprintLibWritable() to determine if calling FootprintSave() is
276 // even legal, so I spend no time on internationalization here:273 // even legal, so I spend no time on internationalization here:
277274
278 string msg = StrPrintf( "Github library\n'%s'\nis only writable if you set option '%s' in Library Tables dialog.",275 std::string msg = StrPrintf( "Github library\n'%s'\nis only writable if you set option '%s' in Library Tables dialog.",
279 (const char*) TO_UTF8( aLibraryPath ), PRETTY_DIR );276 (const char*) TO_UTF8( aLibraryPath ), PRETTY_DIR );
280277
281 THROW_IO_ERROR( msg );278 THROW_IO_ERROR( msg );
@@ -356,7 +353,7 @@
356353
357 if( aProperties )354 if( aProperties )
358 {355 {
359 string pretty_dir;356 std::string pretty_dir;
360357
361 if( aProperties->Value( PRETTY_DIR, &pretty_dir ) )358 if( aProperties->Value( PRETTY_DIR, &pretty_dir ) )
362 {359 {
@@ -409,7 +406,7 @@
409406
410 if( fn.GetExt() == kicad_mod )407 if( fn.GetExt() == kicad_mod )
411 {408 {
412 string fp_name = TO_UTF8( fn.GetName() ); // omit extension & path409 std::string fp_name = TO_UTF8( fn.GetName() ); // omit extension & path
413410
414 m_gh_cache->insert( fp_name, entry );411 m_gh_cache->insert( fp_name, entry );
415 }412 }
@@ -420,7 +417,7 @@
420}417}
421418
422419
423bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )420bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, std::string* aZipURL )
424{421{
425 // e.g. "https://github.com/liftoff-sr/pretty_footprints"422 // e.g. "https://github.com/liftoff-sr/pretty_footprints"
426 //D(printf("aRepoURL:%s\n", TO_UTF8( aRepoURL ) );)423 //D(printf("aRepoURL:%s\n", TO_UTF8( aRepoURL ) );)
@@ -460,7 +457,7 @@
460457
461void GITHUB_PLUGIN::remote_get_zip( const wxString& aRepoURL ) throw( IO_ERROR )458void GITHUB_PLUGIN::remote_get_zip( const wxString& aRepoURL ) throw( IO_ERROR )
462{459{
463 string zip_url;460 std::string zip_url;
464461
465 if( !repoURL_zipURL( aRepoURL, &zip_url ) )462 if( !repoURL_zipURL( aRepoURL, &zip_url ) )
466 {463 {
@@ -478,7 +475,7 @@
478475
479 try476 try
480 {477 {
481 ostringstream os;478 std::ostringstream os;
482479
483 h.open( zip_url ); // only one file, therefore do it synchronously.480 h.open( zip_url ); // only one file, therefore do it synchronously.
484 os << &h;481 os << &h;
@@ -495,10 +492,8 @@
495 // https "GET" has faild, report this to API caller.492 // https "GET" has faild, report this to API caller.
496 wxString fmt( _( "Cannot GET zip: '%s'\nfor lib-path: '%s'.\nWhat: '%s'" ) );493 wxString fmt( _( "Cannot GET zip: '%s'\nfor lib-path: '%s'.\nWhat: '%s'" ) );
497494
498 string msg = StrPrintf( TO_UTF8( fmt ),495 std::string msg = StrPrintf( TO_UTF8( fmt ), zip_url.c_str(),
499 zip_url.c_str(),496 TO_UTF8( aRepoURL ), e.what() );
500 TO_UTF8( aRepoURL ),
501 e.what() );
502497
503 THROW_IO_ERROR( msg );498 THROW_IO_ERROR( msg );
504 }499 }
505500
=== modified file 'pcbnew/gpcb_plugin.cpp'
--- pcbnew/gpcb_plugin.cpp 2013-09-25 19:17:06 +0000
+++ pcbnew/gpcb_plugin.cpp 2013-12-04 08:51:30 +0000
@@ -48,9 +48,6 @@
48#include <boost/ptr_container/ptr_map.hpp>48#include <boost/ptr_container/ptr_map.hpp>
49#include <memory.h>49#include <memory.h>
5050
51using namespace std;
52
53
54/**51/**
55 * Definition for enabling and disabling footprint library trace output. See the52 * Definition for enabling and disabling footprint library trace output. See the
56 * wxWidgets documentation on using the WXTRACE environment variable.53 * wxWidgets documentation on using the WXTRACE environment variable.
@@ -118,7 +115,7 @@
118 wxFileName m_file_name; ///< The the full file name and path of the footprint to cache.115 wxFileName m_file_name; ///< The the full file name and path of the footprint to cache.
119 bool m_writable; ///< Writability status of the footprint file.116 bool m_writable; ///< Writability status of the footprint file.
120 wxDateTime m_mod_time; ///< The last file modified time stamp.117 wxDateTime m_mod_time; ///< The last file modified time stamp.
121 auto_ptr< MODULE > m_module;118 std::auto_ptr<MODULE> m_module;
122119
123public:120public:
124 GPCB_FPL_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName );121 GPCB_FPL_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName );
@@ -327,13 +324,13 @@
327 // Old version unit = 1 mil, so conv_unit is 10 or 0.1324 // Old version unit = 1 mil, so conv_unit is 10 or 0.1
328 #define NEW_GPCB_UNIT_CONV ( 0.01*IU_PER_MILS )325 #define NEW_GPCB_UNIT_CONV ( 0.01*IU_PER_MILS )
329326
330 int paramCnt;327 int paramCnt;
331 double conv_unit = NEW_GPCB_UNIT_CONV; // GPCB unit = 0.01 mils and Pcbnew 0.1328 double conv_unit = NEW_GPCB_UNIT_CONV; // GPCB unit = 0.01 mils and Pcbnew 0.1
332 wxPoint refPos( 0, 0 );329 wxPoint refPos( 0, 0 );
333 wxPoint textPos;330 wxPoint textPos;
334 wxString msg;331 wxString msg;
335 wxArrayString parameters;332 wxArrayString parameters;
336 auto_ptr< MODULE > module( new MODULE( NULL ) );333 std::auto_ptr<MODULE> module( new MODULE( NULL ) );
337334
338335
339 if( aLineReader->ReadLine() == NULL )336 if( aLineReader->ReadLine() == NULL )
340337
=== modified file 'pcbnew/kicad_plugin.cpp'
--- pcbnew/kicad_plugin.cpp 2013-11-28 16:40:23 +0000
+++ pcbnew/kicad_plugin.cpp 2013-12-04 08:51:30 +0000
@@ -52,9 +52,6 @@
52#include <boost/ptr_container/ptr_map.hpp>52#include <boost/ptr_container/ptr_map.hpp>
53#include <memory.h>53#include <memory.h>
5454
55using namespace std;
56
57
58#define FMTIU BOARD_ITEM::FormatInternalUnits55#define FMTIU BOARD_ITEM::FormatInternalUnits
5956
60/**57/**
@@ -78,7 +75,7 @@
78 wxFileName m_file_name; ///< The the full file name and path of the footprint to cache.75 wxFileName m_file_name; ///< The the full file name and path of the footprint to cache.
79 bool m_writable; ///< Writability status of the footprint file.76 bool m_writable; ///< Writability status of the footprint file.
80 wxDateTime m_mod_time; ///< The last file modified time stamp.77 wxDateTime m_mod_time; ///< The last file modified time stamp.
81 auto_ptr< MODULE > m_module;78 std::auto_ptr<MODULE> m_module;
8279
83public:80public:
84 FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName );81 FP_CACHE_ITEM( MODULE* aModule, const wxFileName& aFileName );
8582
=== modified file 'pcbnew/legacy_plugin.cpp'
--- pcbnew/legacy_plugin.cpp 2013-11-29 18:29:41 +0000
+++ pcbnew/legacy_plugin.cpp 2013-12-04 08:51:30 +0000
@@ -147,9 +147,6 @@
147#endif147#endif
148148
149149
150using namespace std; // auto_ptr
151
152
153static inline const char* ShowVertJustify( EDA_TEXT_VJUSTIFY_T vertical )150static inline const char* ShowVertJustify( EDA_TEXT_VJUSTIFY_T vertical )
154{151{
155 const char* rs;152 const char* rs;
@@ -244,9 +241,9 @@
244 m_board->SetFileName( aFileName );241 m_board->SetFileName( aFileName );
245242
246 // delete on exception, iff I own m_board, according to aAppendToMe243 // delete on exception, iff I own m_board, according to aAppendToMe
247 auto_ptr<BOARD> deleter( aAppendToMe ? NULL : m_board );244 std::auto_ptr<BOARD> deleter( aAppendToMe ? NULL : m_board );
248245
249 FILE_LINE_READER reader( aFileName );246 FILE_LINE_READER reader( aFileName );
250247
251 m_reader = &reader; // member function accessibility248 m_reader = &reader; // member function accessibility
252249
@@ -276,7 +273,7 @@
276273
277 if( TESTLINE( "$MODULE" ) )274 if( TESTLINE( "$MODULE" ) )
278 {275 {
279 auto_ptr<MODULE> module( new MODULE( m_board ) );276 std::auto_ptr<MODULE> module( new MODULE( m_board ) );
280277
281 FPID fpid;278 FPID fpid;
282 std::string fpName = StrPurge( line + SZ( "$MODULE" ) );279 std::string fpName = StrPurge( line + SZ( "$MODULE" ) );
@@ -1149,7 +1146,7 @@
11491146
1150void LEGACY_PLUGIN::loadPAD( MODULE* aModule )1147void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
1151{1148{
1152 auto_ptr<D_PAD> pad( new D_PAD( aModule ) );1149 std::auto_ptr<D_PAD> pad( new D_PAD( aModule ) );
1153 char* line;1150 char* line;
11541151
1155 while( ( line = READLINE( m_reader ) ) != NULL )1152 while( ( line = READLINE( m_reader ) ) != NULL )
@@ -1401,7 +1398,7 @@
1401 THROW_IO_ERROR( m_error );1398 THROW_IO_ERROR( m_error );
1402 }1399 }
14031400
1404 auto_ptr<EDGE_MODULE> dwg( new EDGE_MODULE( aModule, shape ) ); // a drawing1401 std::auto_ptr<EDGE_MODULE> dwg( new EDGE_MODULE( aModule, shape ) ); // a drawing
14051402
1406 const char* data;1403 const char* data;
14071404
@@ -1696,8 +1693,8 @@
1696 $EndDRAWSEGMENT1693 $EndDRAWSEGMENT
1697 */1694 */
16981695
1699 auto_ptr<DRAWSEGMENT> dseg( new DRAWSEGMENT( m_board ) );1696 std::auto_ptr<DRAWSEGMENT> dseg( new DRAWSEGMENT( m_board ) );
1700 char* line;1697 char* line;
17011698
1702 while( ( line = READLINE( m_reader ) ) != NULL )1699 while( ( line = READLINE( m_reader ) ) != NULL )
1703 {1700 {
@@ -2095,7 +2092,7 @@
2095 // yet since that would bypass duplicate netclass name checking within the BOARD.2092 // yet since that would bypass duplicate netclass name checking within the BOARD.
2096 // store it temporarily in an auto_ptr until successfully inserted into the BOARD2093 // store it temporarily in an auto_ptr until successfully inserted into the BOARD
2097 // just before returning.2094 // just before returning.
2098 auto_ptr<NETCLASS> nc( new NETCLASS( m_board, wxEmptyString ) );2095 std::auto_ptr<NETCLASS> nc( new NETCLASS( m_board, wxEmptyString ) );
20992096
2100 while( ( line = READLINE( m_reader ) ) != NULL )2097 while( ( line = READLINE( m_reader ) ) != NULL )
2101 {2098 {
@@ -2182,7 +2179,7 @@
21822179
2183void LEGACY_PLUGIN::loadZONE_CONTAINER()2180void LEGACY_PLUGIN::loadZONE_CONTAINER()
2184{2181{
2185 auto_ptr<ZONE_CONTAINER> zc( new ZONE_CONTAINER( m_board ) );2182 std::auto_ptr<ZONE_CONTAINER> zc( new ZONE_CONTAINER( m_board ) );
21862183
2187 CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::NO_HATCH;2184 CPolyLine::HATCH_STYLE outline_hatch = CPolyLine::NO_HATCH;
2188 bool sawCorner = false;2185 bool sawCorner = false;
@@ -2446,8 +2443,8 @@
24462443
2447void LEGACY_PLUGIN::loadDIMENSION()2444void LEGACY_PLUGIN::loadDIMENSION()
2448{2445{
2449 auto_ptr<DIMENSION> dim( new DIMENSION( m_board ) );2446 std::auto_ptr<DIMENSION> dim( new DIMENSION( m_board ) );
2450 char* line;2447 char* line;
24512448
2452 while( ( line = READLINE( m_reader ) ) != NULL )2449 while( ( line = READLINE( m_reader ) ) != NULL )
2453 {2450 {
@@ -4031,9 +4028,9 @@
4031 // test first for the $MODULE, even before reading because of INDEX bug.4028 // test first for the $MODULE, even before reading because of INDEX bug.
4032 if( TESTLINE( "$MODULE" ) )4029 if( TESTLINE( "$MODULE" ) )
4033 {4030 {
4034 auto_ptr<MODULE> module( new MODULE( m_owner->m_board ) );4031 std::auto_ptr<MODULE> module( new MODULE( m_owner->m_board ) );
40354032
4036 std::string footprintName = StrPurge( line + SZ( "$MODULE" ) );4033 std::string footprintName = StrPurge( line + SZ( "$MODULE" ) );
40374034
4038 // The footprint names in legacy libraries can contain the '/' and ':'4035 // The footprint names in legacy libraries can contain the '/' and ':'
4039 // characters which will cause the FPID parser to choke.4036 // characters which will cause the FPID parser to choke.
40404037
=== modified file 'pcbnew/pcb_parser.cpp'
--- pcbnew/pcb_parser.cpp 2013-09-24 18:45:57 +0000
+++ pcbnew/pcb_parser.cpp 2013-12-04 08:51:30 +0000
@@ -51,9 +51,6 @@
51#include <pcb_parser.h>51#include <pcb_parser.h>
5252
5353
54using namespace std;
55
56
57void PCB_PARSER::init()54void PCB_PARSER::init()
58{55{
59 m_layerIndices.clear();56 m_layerIndices.clear();
@@ -263,7 +260,7 @@
263260
264 T token;261 T token;
265262
266 auto_ptr< S3D_MASTER > n3D( new S3D_MASTER( NULL ) );263 std::auto_ptr< S3D_MASTER > n3D( new S3D_MASTER( NULL ) );
267264
268 NeedSYMBOLorNUMBER();265 NeedSYMBOLorNUMBER();
269 n3D->m_Shape3DName = FromUTF8();266 n3D->m_Shape3DName = FromUTF8();
@@ -1084,7 +1081,7 @@
10841081
1085 T token;1082 T token;
10861083
1087 auto_ptr<NETCLASS> nc( new NETCLASS( m_board, wxEmptyString ) );1084 std::auto_ptr<NETCLASS> nc( new NETCLASS( m_board, wxEmptyString ) );
10881085
1089 // Read netclass name (can be a name or just a number like track width)1086 // Read netclass name (can be a name or just a number like track width)
1090 NeedSYMBOLorNUMBER();1087 NeedSYMBOLorNUMBER();
@@ -1164,7 +1161,7 @@
11641161
1165 T token;1162 T token;
1166 wxPoint pt;1163 wxPoint pt;
1167 auto_ptr< DRAWSEGMENT > segment( new DRAWSEGMENT( NULL ) );1164 std::auto_ptr< DRAWSEGMENT > segment( new DRAWSEGMENT( NULL ) );
11681165
1169 switch( CurTok() )1166 switch( CurTok() )
1170 {1167 {
@@ -1325,7 +1322,7 @@
13251322
1326 T token;1323 T token;
13271324
1328 auto_ptr< TEXTE_PCB > text( new TEXTE_PCB( m_board ) );1325 std::auto_ptr<TEXTE_PCB> text( new TEXTE_PCB( m_board ) );
1329 NeedSYMBOLorNUMBER();1326 NeedSYMBOLorNUMBER();
13301327
1331 text->SetText( FromUTF8() );1328 text->SetText( FromUTF8() );
@@ -1393,7 +1390,7 @@
13931390
1394 T token;1391 T token;
13951392
1396 auto_ptr< DIMENSION > dimension( new DIMENSION( NULL ) );1393 std::auto_ptr<DIMENSION> dimension( new DIMENSION( NULL ) );
13971394
1398 dimension->SetValue( parseBoardUnits( "dimension value" ) );1395 dimension->SetValue( parseBoardUnits( "dimension value" ) );
1399 NeedLEFT();1396 NeedLEFT();
@@ -1545,7 +1542,7 @@
1545 T token;1542 T token;
1546 FPID fpid;1543 FPID fpid;
15471544
1548 auto_ptr< MODULE > module( new MODULE( m_board ) );1545 std::auto_ptr<MODULE> module( new MODULE( m_board ) );
15491546
1550 module->SetInitialComments( aInitialComments );1547 module->SetInitialComments( aInitialComments );
15511548
@@ -1773,7 +1770,7 @@
17731770
1774 T token = NextTok();1771 T token = NextTok();
17751772
1776 auto_ptr< TEXTE_MODULE > text( new TEXTE_MODULE( NULL ) );1773 std::auto_ptr<TEXTE_MODULE> text( new TEXTE_MODULE( NULL ) );
17771774
1778 switch( token )1775 switch( token )
1779 {1776 {
@@ -1858,7 +1855,7 @@
1858 wxPoint pt;1855 wxPoint pt;
1859 T token;1856 T token;
18601857
1861 auto_ptr< EDGE_MODULE > segment( new EDGE_MODULE( NULL ) );1858 std::auto_ptr< EDGE_MODULE > segment( new EDGE_MODULE( NULL ) );
18621859
1863 switch( CurTok() )1860 switch( CurTok() )
1864 {1861 {
@@ -2023,7 +2020,7 @@
20232020
2024 wxSize sz;2021 wxSize sz;
2025 wxPoint pt;2022 wxPoint pt;
2026 auto_ptr< D_PAD > pad( new D_PAD( NULL ) );2023 std::auto_ptr< D_PAD > pad( new D_PAD( NULL ) );
20272024
2028 NeedSYMBOLorNUMBER();2025 NeedSYMBOLorNUMBER();
2029 pad->SetPadName( FromUTF8() );2026 pad->SetPadName( FromUTF8() );
@@ -2260,7 +2257,7 @@
2260 wxPoint pt;2257 wxPoint pt;
2261 T token;2258 T token;
22622259
2263 auto_ptr< TRACK > track( new TRACK( m_board ) );2260 std::auto_ptr< TRACK > track( new TRACK( m_board ) );
22642261
2265 for( token = NextTok(); token != T_RIGHT; token = NextTok() )2262 for( token = NextTok(); token != T_RIGHT; token = NextTok() )
2266 {2263 {
@@ -2322,7 +2319,7 @@
2322 wxPoint pt;2319 wxPoint pt;
2323 T token;2320 T token;
23242321
2325 auto_ptr< SEGVIA > via( new SEGVIA( m_board ) );2322 std::auto_ptr< SEGVIA > via( new SEGVIA( m_board ) );
23262323
2327 for( token = NextTok(); token != T_RIGHT; token = NextTok() )2324 for( token = NextTok(); token != T_RIGHT; token = NextTok() )
2328 {2325 {
@@ -2407,7 +2404,7 @@
2407 // bigger scope since each filled_polygon is concatenated in here2404 // bigger scope since each filled_polygon is concatenated in here
2408 CPOLYGONS_LIST pts;2405 CPOLYGONS_LIST pts;
24092406
2410 auto_ptr< ZONE_CONTAINER > zone( new ZONE_CONTAINER( m_board ) );2407 std::auto_ptr< ZONE_CONTAINER > zone( new ZONE_CONTAINER( m_board ) );
24112408
2412 zone->SetPriority( 0 );2409 zone->SetPriority( 0 );
24132410
@@ -2721,8 +2718,7 @@
2721 wxPoint pt;2718 wxPoint pt;
2722 T token;2719 T token;
27232720
2724 auto_ptr< PCB_TARGET > target( new PCB_TARGET( NULL ) );2721 std::auto_ptr< PCB_TARGET > target( new PCB_TARGET( NULL ) );
2725
27262722
2727 for( token = NextTok(); token != T_RIGHT; token = NextTok() )2723 for( token = NextTok(); token != T_RIGHT; token = NextTok() )
2728 {2724 {
27292725
=== modified file 'pcbnew/router/pns_line.cpp'
--- pcbnew/router/pns_line.cpp 2013-10-14 18:40:36 +0000
+++ pcbnew/router/pns_line.cpp 2013-12-04 08:51:30 +0000
@@ -29,7 +29,6 @@
29#include "pns_utils.h"29#include "pns_utils.h"
30#include "pns_router.h"30#include "pns_router.h"
3131
32using namespace std;
33using boost::optional;32using boost::optional;
3433
35PNS_LINE* PNS_LINE::Clone() const34PNS_LINE* PNS_LINE::Clone() const
@@ -321,10 +320,10 @@
321320
322 SHAPE_LINE_CHAIN l_orig( m_line );321 SHAPE_LINE_CHAIN l_orig( m_line );
323 SHAPE_LINE_CHAIN l_hull;322 SHAPE_LINE_CHAIN l_hull;
324 vector<bool> outside, on_edge, inside;323 std::vector<bool> outside, on_edge, inside;
325 SHAPE_LINE_CHAIN path;324 SHAPE_LINE_CHAIN path;
326325
327 vector<INTERSECTION> isects;326 std::vector<INTERSECTION> isects;
328327
329 // don't calculate walkaround for empty lines328 // don't calculate walkaround for empty lines
330 if( m_line.PointCount() < 2 )329 if( m_line.PointCount() < 2 )
331330
=== modified file 'pcbnew/router/pns_line_placer.cpp'
--- pcbnew/router/pns_line_placer.cpp 2013-10-14 18:40:36 +0000
+++ pcbnew/router/pns_line_placer.cpp 2013-12-04 08:51:30 +0000
@@ -18,7 +18,6 @@
18 * with this program. If not, see <http://www.gnu.or/licenses/>.18 * with this program. If not, see <http://www.gnu.or/licenses/>.
19 */19 */
2020
21#include <vector>
22#include <boost/foreach.hpp>21#include <boost/foreach.hpp>
23#include <boost/optional.hpp>22#include <boost/optional.hpp>
2423
@@ -30,7 +29,6 @@
30#include "pns_shove.h"29#include "pns_shove.h"
31#include "pns_utils.h"30#include "pns_utils.h"
3231
33using namespace std;
34using boost::optional;32using boost::optional;
3533
36PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE* aWorld )34PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE* aWorld )
@@ -528,7 +526,7 @@
528526
529 const int TailLookbackSegments = 5;527 const int TailLookbackSegments = 5;
530528
531 int threshold = min( tail.PointCount(), TailLookbackSegments + 1 );529 int threshold = std::min( tail.PointCount(), TailLookbackSegments + 1 );
532530
533 if( tail.SegmentCount() < 3 )531 if( tail.SegmentCount() < 3 )
534 return false;532 return false;
535533
=== modified file 'pcbnew/router/pns_node.cpp'
--- pcbnew/router/pns_node.cpp 2013-10-14 18:40:36 +0000
+++ pcbnew/router/pns_node.cpp 2013-12-04 08:51:30 +0000
@@ -37,8 +37,6 @@
37#include "pns_joint.h"37#include "pns_joint.h"
38#include "pns_index.h"38#include "pns_index.h"
3939
40using namespace std;
41
42using boost::unordered_set;40using boost::unordered_set;
43using boost::unordered_map;41using boost::unordered_map;
4442
@@ -138,7 +136,7 @@
138 if( isRoot() )136 if( isRoot() )
139 return;137 return;
140138
141 for( vector<PNS_NODE*>::iterator i = m_parent->m_children.begin();139 for( std::vector<PNS_NODE*>::iterator i = m_parent->m_children.begin();
142 i != m_parent->m_children.end(); ++i )140 i != m_parent->m_children.end(); ++i )
143 {141 {
144 if( *i == this )142 if( *i == this )
@@ -284,7 +282,7 @@
284 VECTOR2I ip_first, ip_last;282 VECTOR2I ip_first, ip_last;
285 int dist_max = INT_MIN;283 int dist_max = INT_MIN;
286284
287 vector<SHAPE_LINE_CHAIN::INTERSECTION> isect_list;285 std::vector<SHAPE_LINE_CHAIN::INTERSECTION> isect_list;
288286
289 int clearance = GetClearance( obs.item, &aLine );287 int clearance = GetClearance( obs.item, &aLine );
290288
@@ -564,7 +562,7 @@
564562
565void PNS_NODE::removeLine( PNS_LINE* aLine )563void PNS_NODE::removeLine( PNS_LINE* aLine )
566{564{
567 vector<PNS_SEGMENT*>* segRefs = aLine->GetLinkedSegments();565 std::vector<PNS_SEGMENT*>* segRefs = aLine->GetLinkedSegments();
568566
569 if( !segRefs )567 if( !segRefs )
570 return;568 return;
@@ -700,7 +698,7 @@
700}698}
701699
702700
703int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, vector<PNS_LINE*>& aLines )701int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector<PNS_LINE*>& aLines )
704{702{
705 BOOST_FOREACH( PNS_ITEM* item, a.GetLinkList() )703 BOOST_FOREACH( PNS_ITEM* item, a.GetLinkList() )
706 {704 {
@@ -763,7 +761,7 @@
763 // try to find the joint in this node.761 // try to find the joint in this node.
764 JointMap::iterator f = m_joints.find( tag );762 JointMap::iterator f = m_joints.find( tag );
765763
766 pair<JointMap::iterator, JointMap::iterator> range;764 std::pair<JointMap::iterator, JointMap::iterator> range;
767765
768 // not found and we are not root? find in the root and copy results here.766 // not found and we are not root? find in the root and copy results here.
769 if( f == m_joints.end() && !isRoot() )767 if( f == m_joints.end() && !isRoot() )
@@ -895,7 +893,7 @@
895 printf( "Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() );893 printf( "Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() );
896894
897895
898 for( vector<PNS_SEGMENT*>::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j )896 for( std::vector<PNS_SEGMENT*>::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j )
899 {897 {
900 printf( "%s ", (*j)->GetSeg().A.Format().c_str() );898 printf( "%s ", (*j)->GetSeg().A.Format().c_str() );
901899
@@ -932,7 +930,7 @@
932void PNS_NODE::releaseChildren()930void PNS_NODE::releaseChildren()
933{931{
934 // copy the kids as the PNS_NODE destructor erases the item from the parent node.932 // copy the kids as the PNS_NODE destructor erases the item from the parent node.
935 vector<PNS_NODE*> kids = m_children;933 std::vector<PNS_NODE*> kids = m_children;
936934
937 BOOST_FOREACH( PNS_NODE * node, kids ) {935 BOOST_FOREACH( PNS_NODE * node, kids ) {
938 node->releaseChildren();936 node->releaseChildren();
939937
=== modified file 'pcbnew/router/pns_optimizer.cpp'
--- pcbnew/router/pns_optimizer.cpp 2013-10-14 18:40:36 +0000
+++ pcbnew/router/pns_optimizer.cpp 2013-12-04 08:51:30 +0000
@@ -28,8 +28,6 @@
28#include "pns_optimizer.h"28#include "pns_optimizer.h"
29#include "pns_utils.h"29#include "pns_utils.h"
3030
31using namespace std;
32
33/**31/**
34 *32 *
35 * Cost Estimator Methods33 * Cost Estimator Methods
@@ -620,8 +618,8 @@
620 const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_RIGHT |618 const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_RIGHT |
621 DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED;619 DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED;
622620
623 typedef pair<int, SHAPE_LINE_CHAIN> RtVariant;621 typedef std::pair<int, SHAPE_LINE_CHAIN> RtVariant;
624 vector<RtVariant> variants;622 std::vector<RtVariant> variants;
625623
626 BreakoutList breakouts = computeBreakouts( aLine->GetWidth(), aPad, true );624 BreakoutList breakouts = computeBreakouts( aLine->GetWidth(), aPad, true );
627625
@@ -629,7 +627,7 @@
629627
630 // bool startDiagonal = DIRECTION_45( line.CSegment(0) ).IsDiagonal();628 // bool startDiagonal = DIRECTION_45( line.CSegment(0) ).IsDiagonal();
631629
632 int p_end = min( aEndVertex, min( 3, line.PointCount() - 1 ) );630 int p_end = std::min( aEndVertex, std::min( 3, line.PointCount() - 1 ) );
633631
634 for( int p = 1; p <= p_end; p++ )632 for( int p = 1; p <= p_end; p++ )
635 {633 {
636634
=== modified file 'pcbnew/router/pns_router.cpp'
--- pcbnew/router/pns_router.cpp 2013-10-14 18:40:36 +0000
+++ pcbnew/router/pns_router.cpp 2013-12-04 08:51:30 +0000
@@ -51,8 +51,6 @@
51#include <class_track.h>51#include <class_track.h>
52#include <layers_id_colors_and_visibility.h>52#include <layers_id_colors_and_visibility.h>
5353
54using namespace std;
55
56// an ugly singleton for drawing debug items within the router context.54// an ugly singleton for drawing debug items within the router context.
57// To be fixed sometime in the future.55// To be fixed sometime in the future.
58static PNS_ROUTER* theRouter;56static PNS_ROUTER* theRouter;
@@ -89,7 +87,7 @@
89 }87 }
9088
91private:89private:
92 vector<int> m_clearanceCache;90 std::vector<int> m_clearanceCache;
93 int m_defaultClearance;91 int m_defaultClearance;
94};92};
9593
@@ -232,7 +230,7 @@
232230
233void PNS_ROUTER::SyncWorld()231void PNS_ROUTER::SyncWorld()
234{232{
235 vector<D_PAD*> pads;233 std::vector<D_PAD*> pads;
236234
237 if( !m_board )235 if( !m_board )
238 {236 {
@@ -662,7 +660,7 @@
662 PNS_NODE* cleaned = aNode->Branch();660 PNS_NODE* cleaned = aNode->Branch();
663 PNS_JOINT a, b;661 PNS_JOINT a, b;
664662
665 vector<PNS_LINE*> lines;663 std::vector<PNS_LINE*> lines;
666664
667 cleaned->FindLineEnds( ourLine, a, b );665 cleaned->FindLineEnds( ourLine, a, b );
668 cleaned->FindLinesBetweenJoints( a, b, lines );666 cleaned->FindLinesBetweenJoints( a, b, lines );
@@ -699,7 +697,7 @@
699 if( aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->GetNet() )697 if( aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->GetNet() )
700 real_end = true;698 real_end = true;
701699
702 int last = ( real_end || m_placingVia ) ? l.SegmentCount() : max( 1, l.SegmentCount() - 1 );700 int last = ( real_end || m_placingVia ) ? l.SegmentCount() : std::max( 1, l.SegmentCount() - 1 );
703701
704 PNS_NODE* latest = m_placer->GetCurrentNode();702 PNS_NODE* latest = m_placer->GetCurrentNode();
705703
@@ -771,7 +769,7 @@
771 if( m_placer->GetTail().GetCLine().SegmentCount() == 0 )769 if( m_placer->GetTail().GetCLine().SegmentCount() == 0 )
772 {770 {
773 m_start_diagonal = !m_start_diagonal;771 m_start_diagonal = !m_start_diagonal;
774 m_placer->SetInitialDirection( m_start_diagonal ? 772 m_placer->SetInitialDirection( m_start_diagonal ?
775 DIRECTION_45( DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) );773 DIRECTION_45( DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) );
776 }774 }
777 else775 else
778776
=== modified file 'pcbnew/router/pns_shove.cpp'
--- pcbnew/router/pns_shove.cpp 2013-11-27 08:46:59 +0000
+++ pcbnew/router/pns_shove.cpp 2013-12-04 08:51:30 +0000
@@ -35,8 +35,6 @@
3535
36#include <profile.h>36#include <profile.h>
3737
38using namespace std;
39
40PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld )38PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld )
41{39{
42 m_root = aWorld;40 m_root = aWorld;
@@ -280,9 +278,9 @@
280278
281PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( PNS_LINE* aCurrentHead )279PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( PNS_LINE* aCurrentHead )
282{280{
283 stack <PNS_LINE*> lineStack;281 std::stack<PNS_LINE*> lineStack;
284 PNS_NODE* node, * parent;282 PNS_NODE* node, * parent;
285 PNS_VIA* headVia = NULL;283 PNS_VIA* headVia = NULL;
286 bool fail = false;284 bool fail = false;
287 int iter = 0;285 int iter = 0;
288286
289287
=== modified file 'pcbnew/router/pns_walkaround.cpp'
--- pcbnew/router/pns_walkaround.cpp 2013-10-14 18:40:36 +0000
+++ pcbnew/router/pns_walkaround.cpp 2013-12-04 08:51:30 +0000
@@ -18,8 +18,6 @@
18 * with this program. If not, see <http://www.gnu.or/licenses/>.18 * with this program. If not, see <http://www.gnu.or/licenses/>.
19 */19 */
2020
21#include <vector>
22
23#include <boost/foreach.hpp>21#include <boost/foreach.hpp>
24#include <boost/optional.hpp>22#include <boost/optional.hpp>
2523
@@ -29,8 +27,6 @@
29#include "pns_optimizer.h"27#include "pns_optimizer.h"
30#include "pns_utils.h"28#include "pns_utils.h"
31#include "pns_router.h"29#include "pns_router.h"
32
33using namespace std;
34using boost::optional;30using boost::optional;
3531
36void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath )32void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath )
3733
=== modified file 'pcbnew/router/router_tool.cpp'
--- pcbnew/router/router_tool.cpp 2013-10-15 08:41:00 +0000
+++ pcbnew/router/router_tool.cpp 2013-12-04 08:51:30 +0000
@@ -39,7 +39,6 @@
39#include "trace.h"39#include "trace.h"
4040
41using namespace KIGFX;41using namespace KIGFX;
42using namespace std;
43using boost::optional;42using boost::optional;
4443
45static TOOL_ACTION ACT_AutoEndRoute( "AutoEndRoute", AS_CONTEXT, 'F' );44static TOOL_ACTION ACT_AutoEndRoute( "AutoEndRoute", AS_CONTEXT, 'F' );
4645
=== modified file 'polygon/SutherlandHodgmanClipPoly.h'
--- polygon/SutherlandHodgmanClipPoly.h 2009-02-20 14:31:16 +0000
+++ polygon/SutherlandHodgmanClipPoly.h 2013-12-04 08:51:30 +0000
@@ -31,7 +31,6 @@
31#include <vector>31#include <vector>
32#include <functional>32#include <functional>
3333
34using namespace std;
35#ifndef _GDIPLUS_H34#ifndef _GDIPLUS_H
3635
37// I designed this with GDI+ in mind. However, this particular code doesn't36// I designed this with GDI+ in mind. However, this particular code doesn't
@@ -80,9 +79,9 @@
8079
81#endif // _GDIPLUS_H80#endif // _GDIPLUS_H
8281
83typedef vector<PointF> pointVector;82typedef std::vector<PointF> pointVector;
84typedef vector<PointF>::iterator pointIterator;83typedef std::vector<PointF>::iterator pointIterator;
85typedef vector<PointF>::const_iterator cpointIterator;84typedef std::vector<PointF>::const_iterator cpointIterator;
8685
87class SutherlandHodgman86class SutherlandHodgman
88{87{
@@ -249,10 +248,10 @@
249 // rectangles, we include the left and top boundaries, but not the right and bottom boundaries.248 // rectangles, we include the left and top boundaries, but not the right and bottom boundaries.
250 // In other words: a vertex on the left boundary is considered to be inside, but a vertex249 // In other words: a vertex on the left boundary is considered to be inside, but a vertex
251 // on the right boundary is considered to be outside.250 // on the right boundary is considered to be outside.
252 typedef BoundaryVert < less<REAL> > BoundaryRight;251 typedef BoundaryVert<std::less<REAL> > BoundaryRight;
253 typedef BoundaryHor < greater_equal<REAL> > BoundaryTop;252 typedef BoundaryHor<std::greater_equal<REAL> > BoundaryTop;
254 typedef BoundaryVert < greater_equal<REAL> > BoundaryLeft;253 typedef BoundaryVert<std::greater_equal<REAL> > BoundaryLeft;
255 typedef BoundaryHor < less<REAL> > BoundaryBottom;254 typedef BoundaryHor<std::less<REAL> > BoundaryBottom;
256255
257 // Next typedefs define the four stages. First template parameter is the boundary,256 // Next typedefs define the four stages. First template parameter is the boundary,
258 // second template parameter is the next stage.257 // second template parameter is the next stage.
259258
=== modified file 'polygon/poly2tri/common/shapes.cc'
--- polygon/poly2tri/common/shapes.cc 2013-09-13 13:28:20 +0000
+++ polygon/poly2tri/common/shapes.cc 2013-12-04 08:51:30 +0000
@@ -1,4 +1,4 @@
1/* 1/*
2 * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors2 * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
3 * http://code.google.com/p/poly2tri/3 * http://code.google.com/p/poly2tri/
4 *4 *
@@ -96,14 +96,14 @@
96 }96 }
97 else if( neighbors_[1] == triangle )97 else if( neighbors_[1] == triangle )
98 {98 {
99 neighbors_[1] = NULL; 99 neighbors_[1] = NULL;
100 }100 }
101 else101 else
102 {102 {
103 neighbors_[2] = NULL;103 neighbors_[2] = NULL;
104 }104 }
105}105}
106 106
107void Triangle::ClearNeighbors()107void Triangle::ClearNeighbors()
108{108{
109 neighbors_[0] = NULL;109 neighbors_[0] = NULL;
@@ -357,10 +357,9 @@
357357
358void Triangle::DebugPrint()358void Triangle::DebugPrint()
359{359{
360 using namespace std;360 std::cout << points_[0]->x << "," << points_[0]->y << " ";
361 cout << points_[0]->x << "," << points_[0]->y << " ";361 std::cout << points_[1]->x << "," << points_[1]->y << " ";
362 cout << points_[1]->x << "," << points_[1]->y << " ";362 std::cout << points_[2]->x << "," << points_[2]->y << "\n";
363 cout << points_[2]->x << "," << points_[2]->y << endl;
364}363}
365364
366}365}
367366
=== modified file 'scripting/kicad.i'
--- scripting/kicad.i 2013-11-01 15:29:50 +0000
+++ scripting/kicad.i 2013-12-04 08:51:30 +0000
@@ -63,8 +63,6 @@
63 #include <cstddef>63 #include <cstddef>
64 #include <vector>64 #include <vector>
6565
66 using namespace std;
67
68 #include <class_title_block.h>66 #include <class_title_block.h>
69 #include <class_colors_design_settings.h>67 #include <class_colors_design_settings.h>
70 #include <class_marker_base.h>68 #include <class_marker_base.h>