From 090d7881e0c5bed3b130c5e4844b4926a84a74b9 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 21 Dec 2020 08:41:05 -0500 Subject: [PATCH] Revert Coverity fix that caused build issue with older versions of Boost. The Boost entropy exception does not exist prior to version 1.67. Once the minimum Boost version is raise to 1.67 or greater, enable catching the exception. We will just have to live with the possibility of an uncaught exception until then. Fixes https://gitlab.com/kicad/code/kicad/-/issues/6804 --- pcbnew/pcb_base_frame.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 5b818bb8f2..2045a94a1b 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -24,7 +24,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +/// @todo The Boost entropy exception does not exist prior to 1.67. Once the minimum Boost +/// version is raise to 1.67 or greater, this version check can be removed. +#include + +#if BOOST_VERSION >= 106700 #include +#endif + #include #include #include @@ -180,6 +187,9 @@ void PCB_BASE_FRAME::FocusOnItem( BOARD_ITEM* aItem ) BOARD_ITEM* lastItem = nullptr; + /// @todo The Boost entropy exception does not exist prior to 1.67. Once the minimum Boost + /// version is raise to 1.67 or greater, this version check can be removed. +#if BOOST_VERSION >= 106700 try { lastItem = GetBoard()->GetItem( lastBrightenedItemID ); @@ -188,6 +198,9 @@ void PCB_BASE_FRAME::FocusOnItem( BOARD_ITEM* aItem ) { wxLogError( "A Boost UUID entropy exception was thrown in %s:%s.", __FILE__, __FUNCTION__ ); } +#else + lastItem = GetBoard()->GetItem( lastBrightenedItemID ); +#endif if( lastItem && lastItem != aItem && lastItem != DELETED_BOARD_ITEM::GetInstance() ) {