← Back to team overview

kicad-developers team mailing list archive

eemodern fix compil issue

 

Hi Jeff,

I just compiled eemodern, and I had a compil error.
This patch fixes the error.

-- 
Jean-Pierre CHARRAS
 eeschema/tools/sch_selection_tool.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eeschema/tools/sch_selection_tool.cpp b/eeschema/tools/sch_selection_tool.cpp
index b7eddca17..ed7142208 100644
--- a/eeschema/tools/sch_selection_tool.cpp
+++ b/eeschema/tools/sch_selection_tool.cpp
@@ -74,7 +74,7 @@ TOOL_ACTION SCH_ACTIONS::removeItemsFromSel( "eeschema.InteractiveSelection.Remo
 TOOL_ACTION SCH_ACTIONS::clearSelection( "eeschema.InteractiveSelection.ClearSelection",
         AS_GLOBAL, 0, "", "" );    // No description, it is not supposed to be shown anywhere
 
-    
+
 SCH_SELECTION_TOOL::SCH_SELECTION_TOOL() :
         TOOL_INTERACTIVE( "eeschema.InteractiveSelection" ),
         m_frame( nullptr ),
@@ -513,7 +513,8 @@ int SCH_SELECTION_TOOL::SelectNode( const TOOL_EVENT& aEvent )
 
 int SCH_SELECTION_TOOL::SelectConnection( const TOOL_EVENT& aEvent )
 {
-    RequestSelection( (KICAD_T[]) { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT } );
+    static KICAD_T candidates[] { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT };
+    RequestSelection( candidates );
 
     if( m_selection.Empty() )
         return 0;

Follow ups