Revert fix for false positive Coverity warning.
This commit is contained in:
parent
30ba1b8007
commit
2f19112212
|
@ -126,18 +126,7 @@ TOOL_EVENT TOOL_ACTION::MakeEvent() const
|
|||
|
||||
if( m_group.has_value() )
|
||||
{
|
||||
// This should probably be checking to see if the m_group option is actually
|
||||
// set rather than attempting to access the value when no option is set. If
|
||||
// that is the case, then the check above should first check if the options is
|
||||
// set so that an exception cannot be thrown.
|
||||
try
|
||||
{
|
||||
evt.SetActionGroup( m_group.value() );
|
||||
}
|
||||
catch( const std::bad_optional_access& e )
|
||||
{
|
||||
wxFAIL_MSG( e.what() );
|
||||
}
|
||||
evt.SetActionGroup( m_group.value() );
|
||||
}
|
||||
|
||||
if( m_param.has_value() )
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -157,19 +158,8 @@ const std::string TOOL_EVENT::Format() const
|
|||
|
||||
if( m_actionGroup.has_value() )
|
||||
{
|
||||
// This should probably be checking to see if the m_actionGroup option is
|
||||
// actually set rather than attempting to access the value when no option
|
||||
// is set. If that is the case, then the check above should first check
|
||||
// if the options is set so that an exception cannot be thrown.
|
||||
try
|
||||
{
|
||||
ev += m_actionGroup.value().GetName() +
|
||||
"(" + std::to_string( m_actionGroup.value().GetGroupID() ) + ")" + " ";
|
||||
}
|
||||
catch( const std::bad_optional_access& e )
|
||||
{
|
||||
wxFAIL_MSG( e.what() );
|
||||
}
|
||||
ev += m_actionGroup.value().GetName() +
|
||||
"(" + std::to_string( m_actionGroup.value().GetGroupID() ) + ")" + " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue