[Kicad-developers] 3D-Viewer: size of the icons in file menu

2015-07-27 Thread Константин Барановский
I noticed that in 3d-viewer the file menu has thin items and exit icon has
small size (less than standard 26x26). It happens because in file menu the
items added by using Append method but must be used AddMenuItem method. So
I changed it and added some icons for the items of export and copy images.
=== modified file '3d-viewer/3d_toolbar.cpp'
--- 3d-viewer/3d_toolbar.cpp	2015-07-26 07:49:02 +
+++ 3d-viewer/3d_toolbar.cpp	2015-07-27 11:37:53 +
@@ -134,14 +134,22 @@
 
 menuBar-Append( fileMenu, _( File ) );
 
-fileMenu-Append( ID_MENU_SCREENCOPY_PNG, _( Create Image (png format) ) );
-fileMenu-Append( ID_MENU_SCREENCOPY_JPEG, _( Create Image (jpeg format) ) );
-
-fileMenu-AppendSeparator();
-fileMenu-Append( ID_TOOL_SCREENCOPY_TOCLIBBOARD, _( Copy 3D Image to Clipboard ) );
-
-fileMenu-AppendSeparator();
-fileMenu-Append( wxID_EXIT, _( Exit ) );
+AddMenuItem( fileMenu, ID_MENU_SCREENCOPY_PNG,
+ _( Create Image (png format) ),
+ KiBitmap( export_xpm ) );
+AddMenuItem( fileMenu, ID_MENU_SCREENCOPY_JPEG,
+ _( Create Image (jpeg format) ),
+ KiBitmap( export_xpm ) );
+
+fileMenu-AppendSeparator();
+AddMenuItem( fileMenu, ID_TOOL_SCREENCOPY_TOCLIBBOARD,
+ _( Copy 3D Image to Clipboard ),
+ KiBitmap( copy_button_xpm ) );
+
+fileMenu-AppendSeparator();
+AddMenuItem( fileMenu, wxID_EXIT,
+ _( Exit ),
+ KiBitmap( exit_xpm ) );
 
 menuBar-Append( prefsMenu, _( Preferences ) );
 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] 3D-Viewer: size of the icons in file menu

2015-07-27 Thread jp charras
Le 27/07/2015 14:10, Константин Барановский a écrit :
 I noticed that in 3d-viewer the file menu has thin items and exit icon has
 small size (less than standard 26x26). It happens because in file menu the
 items added by using Append method but must be used AddMenuItem method. So
 I changed it and added some icons for the items of export and copy images.
 

Committed. Thanks.


-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Documentation help (was Re: Zoom vs Help)

2015-07-27 Thread Andy Peters

 On Jul 26, 2015, at 2:08 AM, Marco Ciampa ciam...@libero.it wrote:
 
 Coming home after long due holydays, I see this:
 
 On Mon, Jul 06, 2015 at 08:37:24AM -0700, Andy Peters wrote:
 I am glad to help out with docs. If someone would be so kind as to
 point me in the right direction, I’ll do what I can.
 
 Feel free to ask _any_ question.
 
 Start from here:
 
 https://github.com/ciampix/kicad-doc
 
 For a historical perspective, read this:

I grabbed the doc sources and installed an Asciidoc editor (Asciidoc FX). I 
think my main agenda will be to first make sure that what the docs say matches 
the software operation (I know, still a moving target), and also to eliminate 
the sort of circular definitions one often sees. You know, the sort of thing 
where there’s a button called Open Fetzer Valve and the doc says something 
pointless like, “Opens or closes the fetzer valve,” while never actually 
explaining what’s a fetzer valve and why you’d want to open or close it.

-a
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH 0/3] Include cleanup

2015-07-27 Thread Simon Richter
Hi,

three small patches for include files cleanup, each of them pretty
self-explanatory.

   Simon

Simon Richter (3):
  Remove superfluous includes
  Include iso646.h for not, and and or keywords
  add missing C++ stdlib headers

 common/gal/graphics_abstraction_layer.cpp  | 2 ++
 common/math/math_util.cpp  | 1 -
 common/tool/action_manager.cpp | 1 +
 eeschema/class_library.h   | 2 ++
 eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 2 ++
 eeschema/sch_sheet_path.h  | 2 ++
 gerbview/class_GERBER.cpp  | 1 +
 include/common.h   | 2 ++
 include/layers_id_colors_and_visibility.h  | 1 -
 include/profile.h  | 1 -
 include/tool/tool_manager.h| 1 +
 pcb_calculator/transline/transline.cpp | 1 +
 pcbnew/ratsnest_data.h | 2 ++
 pcbnew/router/pns_diff_pair.cpp| 1 +
 pcbnew/router/pns_optimizer.cpp| 2 ++
 pcbnew/router/pns_utils.cpp| 2 ++
 pcbnew/tools/conditional_menu.h| 1 +
 pcbnew/tools/edit_points.h | 3 +++
 18 files changed, 25 insertions(+), 3 deletions(-)

-- 
2.1.4

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH 1/3] Remove superfluous includes

2015-07-27 Thread Simon Richter

These are unnecessary:

- in math_util.cpp, including stdint.h is unnecessary because math_util.h
  already requires it
- in the other two headers, no definitions from stdint.h are used.
---
 common/math/math_util.cpp | 1 -
 include/layers_id_colors_and_visibility.h | 1 -
 include/profile.h | 1 -
 3 files changed, 3 deletions(-)

diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp
index 81dafc3..604b879 100644
--- a/common/math/math_util.cpp
+++ b/common/math/math_util.cpp
@@ -27,7 +27,6 @@
 #include cstdlib
 #include climits
 #include math/math_util.h
-#include stdint.h
 
 template
 int rescale( int aNumerator, int aValue, int aDenominator )
diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h
index 7415e42..dcce017 100644
--- a/include/layers_id_colors_and_visibility.h
+++ b/include/layers_id_colors_and_visibility.h
@@ -31,7 +31,6 @@
 #ifndef LAYERS_ID_AND_VISIBILITY_H_
 #define LAYERS_ID_AND_VISIBILITY_H_
 
-#include stdint.h
 #include vector
 #include bitset
 #include wx/string.h
diff --git a/include/profile.h b/include/profile.h
index 4035fcb..acf9166 100644
--- a/include/profile.h
+++ b/include/profile.h
@@ -31,7 +31,6 @@
 #define __TPROFILE_H
 
 #include sys/time.h
-#include string
 #include stdint.h
 
 /**
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH 3/3] add missing C++ stdlib headers

2015-07-27 Thread Simon Richter

These source files use definitions from the standard library without making
sure they are included. It happens to work on current gcc because parts of
the standard library implicitly include these other headers, but that is
not guaranteed.
---
 common/gal/graphics_abstraction_layer.cpp  | 2 ++
 common/tool/action_manager.cpp | 1 +
 eeschema/class_library.h   | 2 ++
 eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 2 ++
 eeschema/sch_sheet_path.h  | 2 ++
 gerbview/class_GERBER.cpp  | 1 +
 include/tool/tool_manager.h| 1 +
 pcb_calculator/transline/transline.cpp | 1 +
 pcbnew/ratsnest_data.h | 2 ++
 pcbnew/router/pns_diff_pair.cpp| 1 +
 pcbnew/router/pns_optimizer.cpp| 2 ++
 pcbnew/router/pns_utils.cpp| 2 ++
 pcbnew/tools/conditional_menu.h| 1 +
 pcbnew/tools/edit_points.h | 3 +++
 14 files changed, 23 insertions(+)

diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp
index d9e9eac..5d9a502 100644
--- a/common/gal/graphics_abstraction_layer.cpp
+++ b/common/gal/graphics_abstraction_layer.cpp
@@ -29,6 +29,8 @@
 #include gal/graphics_abstraction_layer.h
 #include gal/definitions.h
 
+#include cmath
+
 using namespace KIGFX;
 
 
diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp
index 72706be..6f96ec4 100644
--- a/common/tool/action_manager.cpp
+++ b/common/tool/action_manager.cpp
@@ -30,6 +30,7 @@
 #include hotkeys_basic.h
 #include boost/foreach.hpp
 #include boost/range/adaptor/map.hpp
+#include cctype
 #include cassert
 
 ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) :
diff --git a/eeschema/class_library.h b/eeschema/class_library.h
index 37bf0dd..355cab0 100644
--- a/eeschema/class_library.h
+++ b/eeschema/class_library.h
@@ -37,6 +37,8 @@
 
 #include project.h
 
+#include map
+
 class LINE_READER;
 class OUTPUTFORMATTER;
 
diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp
index dc39b53..181ae32 100644
--- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp
+++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp
@@ -4,6 +4,8 @@
 
 #include boost/algorithm/string/join.hpp
 #include queue
+#include list
+#include map
 
 /* Avoid wxWidgets bug #16906 -- http://trac.wxwidgets.org/ticket/16906
  *
diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h
index 5cd60bc..a451e9f 100644
--- a/eeschema/sch_sheet_path.h
+++ b/eeschema/sch_sheet_path.h
@@ -33,6 +33,8 @@
 
 #include base_struct.h
 
+#include map
+
 
 /** Info about complex hierarchies handling:
  * A hierarchical schematic uses sheets (hierarchical sheets) included in a
diff --git a/gerbview/class_GERBER.cpp b/gerbview/class_GERBER.cpp
index 59d7615..f4483c6 100644
--- a/gerbview/class_GERBER.cpp
+++ b/gerbview/class_GERBER.cpp
@@ -39,6 +39,7 @@
 #include class_X2_gerber_attributes.h
 
 #include algorithm
+#include map
 
 
 /**
diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h
index 69cd60f..c5178f6 100644
--- a/include/tool/tool_manager.h
+++ b/include/tool/tool_manager.h
@@ -29,6 +29,7 @@
 #include deque
 #include typeinfo
 #include map
+#include list
 
 #include tool/tool_base.h
 
diff --git a/pcb_calculator/transline/transline.cpp b/pcb_calculator/transline/transline.cpp
index fe608cb..cdaa633 100644
--- a/pcb_calculator/transline/transline.cpp
+++ b/pcb_calculator/transline/transline.cpp
@@ -21,6 +21,7 @@
  *
  */
 
+#include cmath
 #include limits
 #include transline.h
 #include units.h
diff --git a/pcbnew/ratsnest_data.h b/pcbnew/ratsnest_data.h
index b1bd137..8df7672 100644
--- a/pcbnew/ratsnest_data.h
+++ b/pcbnew/ratsnest_data.h
@@ -39,6 +39,8 @@
 #include boost/unordered_map.hpp
 #include boost/foreach.hpp
 
+#include deque
+
 class BOARD;
 class BOARD_ITEM;
 class BOARD_CONNECTED_ITEM;
diff --git a/pcbnew/router/pns_diff_pair.cpp b/pcbnew/router/pns_diff_pair.cpp
index 97ef4f8..140474e 100644
--- a/pcbnew/router/pns_diff_pair.cpp
+++ b/pcbnew/router/pns_diff_pair.cpp
@@ -22,6 +22,7 @@
 
 #include cstdio
 #include cstdlib
+#include cmath
 #include limits
 
 #include geometry/shape.h
diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp
index 02bbb73..090c527 100644
--- a/pcbnew/router/pns_optimizer.cpp
+++ b/pcbnew/router/pns_optimizer.cpp
@@ -24,6 +24,8 @@
 #include geometry/shape_rect.h
 #include geometry/shape_convex.h
 
+#include cmath
+
 #include pns_line.h
 #include pns_diff_pair.h
 #include pns_node.h
diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp
index 31eb78d..f7871be 100644
--- a/pcbnew/router/pns_utils.cpp
+++ b/pcbnew/router/pns_utils.cpp
@@ -25,6 +25,8 @@
 
 #include geometry/shape_segment.h
 
+#include cmath
+
 const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I aP0, const VECTOR2I aSize,
 

[Kicad-developers] [PATCH 2/3] Include iso646.h for not, and and or keywords

2015-07-27 Thread Simon Richter

These are not actually keywords in the C++ standard, but macros. Unless
iso646.h is included, these are not guaranteed to be present.
---
 include/common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/common.h b/include/common.h
index b881444..8be1e25 100644
--- a/include/common.h
+++ b/include/common.h
@@ -41,6 +41,8 @@
 #include richio.h
 #include colors.h
 
+#include iso646.h
+
 
 class wxAboutDialogInfo;
 class SEARCH_STACK;
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH 4/3] Add cstddef include for offsetof

2015-07-27 Thread Simon Richter

This macro is defined in stddef.h, so cstddef is needed.
---
 include/gal/opengl/vertex_common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/gal/opengl/vertex_common.h b/include/gal/opengl/vertex_common.h
index 9ec8d9b..0d8eb9d 100644
--- a/include/gal/opengl/vertex_common.h
+++ b/include/gal/opengl/vertex_common.h
@@ -32,6 +32,8 @@
 
 #include GL/glew.h
 
+#include cstddef
+
 namespace KIGFX
 {
 // Possible types of shaders
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH] Clarify fabs() overload

2015-07-27 Thread Simon Richter
fabs(int) is not defined in the standard, so this is ambiguous. Moving the
cast inside the argument clarifies which overload we want, and gives the
correct return type.
---
 common/geometry/shape_poly_set.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/geometry/shape_poly_set.cpp 
b/common/geometry/shape_poly_set.cpp
index b70f84e..ec4e67e 100644
--- a/common/geometry/shape_poly_set.cpp
+++ b/common/geometry/shape_poly_set.cpp
@@ -257,7 +257,7 @@ void SHAPE_POLY_SET::Inflate( int aFactor, int 
aCircleSegmentsCount )
 
 PolyTree solution;
 
-c.ArcTolerance = (double)fabs( aFactor ) / M_PI / aCircleSegmentsCount;
+c.ArcTolerance = fabs( (double) aFactor ) / M_PI / aCircleSegmentsCount;
 
 c.Execute( solution, aFactor );
 
-- 
2.1.4


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH] Avoid cast from const_iterator to iterator

2015-07-27 Thread Simon Richter
Hi,

this repairs const correctness for some STL container accesses:

- The result of .begin() and .end() on a const reference is a const_iterator.
- The .erase() function requires a mutable iterator.

The GNU C++ stdlib actually uses the same type here, because set members
may not be manipulated through an iterator (because the set is sorted), but
that is not a contractual guarantee.

   Simon

---
 common/view/view.cpp  |  2 +-
 pcbnew/kicad_plugin.cpp   |  2 +-
 pcbnew/tools/drawing_tool.cpp | 10 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/view/view.cpp b/common/view/view.cpp
index 8f1933c..6f94af8 100644
--- a/common/view/view.cpp
+++ b/common/view/view.cpp
@@ -985,7 +985,7 @@ bool VIEW::areRequiredLayersEnabled( int aLayerId ) const
 {
 wxASSERT( (unsigned) aLayerId  m_layers.size() );
 
-std::setint::iterator it, it_end;
+std::setint::const_iterator it, it_end;
 
 for( it = m_layers.at( aLayerId ).requiredLayers.begin(),
  it_end = m_layers.at( aLayerId ).requiredLayers.end(); it != it_end; ++it )
diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp
index d701b83..8fbb9c3 100644
--- a/pcbnew/kicad_plugin.cpp
+++ b/pcbnew/kicad_plugin.cpp
@@ -65,7 +65,7 @@ static const wxString traceFootprintLibrary( wxT( KicadFootprintLib ) );
 /// Removes empty nets (i.e. with node count equal zero) from net classes
 void filterNetClass( const BOARD aBoard, NETCLASS aNetClass )
 {
-for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); )
+for( NETCLASS::iterator it = aNetClass.begin(); it != aNetClass.end(); )
 {
 NETINFO_ITEM* netinfo = aBoard.FindNet( *it );
 
diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp
index a3a889f..e5f6030 100644
--- a/pcbnew/tools/drawing_tool.cpp
+++ b/pcbnew/tools/drawing_tool.cpp
@@ -514,7 +514,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT aEvent )
 {
 delta = cursorPos - firstItem-GetPosition();
 
-for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it )
+for( KIGFX::VIEW_GROUP::const_iter it = preview.Begin(), end = preview.End(); it != end; ++it )
 static_castBOARD_ITEM*( *it )-Move( wxPoint( delta.x, delta.y ) );
 
 preview.ViewUpdate();
@@ -524,7 +524,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT aEvent )
 {
 if( evt-IsAction( COMMON_ACTIONS::rotate ) )
 {
-for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it )
+for( KIGFX::VIEW_GROUP::const_iter it = preview.Begin(), end = preview.End(); it != end; ++it )
 static_castBOARD_ITEM*( *it )-Rotate( wxPoint( cursorPos.x, cursorPos.y ),
  m_frame-GetRotationAngle() );
 
@@ -532,7 +532,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT aEvent )
 }
 else if( evt-IsAction( COMMON_ACTIONS::flip ) )
 {
-for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it )
+for( KIGFX::VIEW_GROUP::const_iter it = preview.Begin(), end = preview.End(); it != end; ++it )
 static_castBOARD_ITEM*( *it )-Flip( wxPoint( cursorPos.x, cursorPos.y ) );
 
 preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
@@ -552,7 +552,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT aEvent )
 m_frame-SaveCopyInUndoList( m_board-m_Modules, UR_MODEDIT );
 m_board-m_Modules-SetLastEditTime();
 
-for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it )
+for( KIGFX::VIEW_GROUP::const_iter it = preview.Begin(), end = preview.End(); it != end; ++it )
 {
 BOARD_ITEM* item = static_castBOARD_ITEM*( *it );
 m_board-m_Modules-Add( item );
@@ -579,7 +579,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT aEvent )
 {
 PICKED_ITEMS_LIST picklist;
 
-for( KIGFX::VIEW_GROUP::iter it = preview.Begin(), end = preview.End(); it != end; ++it )
+for( KIGFX::VIEW_GROUP::const_iter it = preview.Begin(), end = preview.End(); it != end; ++it )
 {
 BOARD_ITEM* item = static_castBOARD_ITEM*( *it );
 m_board-Add( item );
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Return value from SHAPE_POLY_SET::pointInPolygon

2015-07-27 Thread Simon Richter
Hi,

that function returns a bool, but common/geometry/shape_poly_set.cpp
line 704-705 has

if( !d )
return -1;

That smells fishy and gives a compiler warning.

   Simon



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] DLL export of PNS_TOOL_BASE

2015-07-27 Thread Simon Richter
Hi,

the MSVC build complains:

pcbnew\router\pns_tool_base.h(37) : warning C4275: non dll-interface
class 'TOOL_INTERACTIVE' used as base for dll-interface class
'PNS_TOOL_BASE'
include\tool/tool_interactive.h(35) : see declaration of 'TOOL_INTERACTIVE'
pcbnew\router\pns_tool_base.h(36) : see declaration of 'PNS_TOOL_BASE'

I can see the point here -- if the base class is not exported, any
functions not overridden in the derived class cannot be imported if the
class is used through the DLL interface.

Is the PNS router actually meant to be used via a DLL interface though,
or can the DLL export for PNS_TOOL_BASE and derived classes be dropped?

If it is, shouldn't the TOOL_INTERACTIVE and TOOL_BASE classes be
exported as well?

   Simon



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH 2/3] Include iso646.h for not, and and or keywords

2015-07-27 Thread Simon Richter
Hi,

On 28.07.2015 06:32, Mark Roszko wrote:

 What? Those keywords are part of the C++ standard from 2003(at least).
 Its only MSVC that is backwards and broken in this regard.

Ah okay, then I misremembered that. Well, I've only used them once in
'99, and back then I needed the header.

   Simon



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH 2/3] Include iso646.h for not, and and or keywords

2015-07-27 Thread Mark Roszko
What? Those keywords are part of the C++ standard from 2003(at least).
Its only MSVC that is backwards and broken in this regard.


They are not part of the C standards and thats why iso646.h exists
for those hipsters with non-qwerty keyboards (I joke)

https://en.wikipedia.org/wiki/C_alternative_tokens
The above mentioned identifiers are operator keywords in the ISO C++
programming language and do not require the inclusion of a header
file.

In fact, here's the standard (C++11 doc at least):
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf

Go to page 22 (pdf page 37). It defines the operators as part of C++.


This is the header on the linux libstdc++
https://gcc.gnu.org/onlinedocs/gcc-4.8.5/libstdc++/api/a00786_source.html

But yea the include ~should~ be harmless for gcc since the file is
blank anyway and it'll fix Microsoft's brokenness.

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp