From 609da9b61d85dc99680fd8a281668dd6f3b7d70b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sun, 15 Oct 2017 18:11:31 +0200 Subject: [PATCH] Add missing sentinels for KICAD_T[] in SCH_EDIT_FRAME::OnLeftClick() --- eeschema/onleftclick.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/onleftclick.cpp b/eeschema/onleftclick.cpp index ae92c696bd..f93e0e80e5 100644 --- a/eeschema/onleftclick.cpp +++ b/eeschema/onleftclick.cpp @@ -315,7 +315,8 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) #ifdef KICAD_SPICE case ID_SIM_PROBE: { - const KICAD_T wiresAndComponents[] = { SCH_LINE_T, SCH_COMPONENT_T, SCH_SHEET_PIN_T }; + constexpr KICAD_T wiresAndComponents[] = { SCH_LINE_T, + SCH_COMPONENT_T, SCH_SHEET_PIN_T, EOT }; item = LocateAndShowItem( aPosition, wiresAndComponents ); if( !item ) @@ -340,7 +341,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) case ID_SIM_TUNE: { - const KICAD_T fieldsAndComponents[] = { SCH_COMPONENT_T, SCH_FIELD_T }; + constexpr KICAD_T fieldsAndComponents[] = { SCH_COMPONENT_T, SCH_FIELD_T, EOT }; item = LocateAndShowItem( aPosition, fieldsAndComponents ); if( !item )