Remove non-wx assert path to match rest of code

The WX_COMPATIBILITY mode is always assumed now (the option was removed
previously), but the define is no longer present. So remove the old code
that checked for it and just leave the wxASSERT statements.
This commit is contained in:
Ian McInerney 2023-06-21 13:46:58 +01:00
parent a2bd7192c0
commit 5d718617a2
2 changed files with 0 additions and 16 deletions

View File

@ -285,11 +285,7 @@ public:
template<typename T>
T GetParam() const
{
#ifdef WX_COMPATIBILITY
wxASSERT_MSG( m_param.has_value(), "Attempted to get a parameter from an action with no parameter." );
#else
assert( m_param.has_value() );
#endif
T param;
@ -299,13 +295,9 @@ public:
}
catch( const std::bad_any_cast& e )
{
#ifdef WX_COMPATIBILITY
wxASSERT_MSG( false,
wxString::Format( "Requested parameter type %s from action with parameter type %s.",
typeid(T).name(), m_param.type().name() ) );
#else
assert( false );
#endif
}
return param;

View File

@ -438,11 +438,7 @@ public:
template<typename T>
T Parameter() const
{
#ifdef WX_COMPATIBILITY
wxASSERT_MSG( m_param.has_value(), "Attempted to get a parameter from an event with no parameter." );
#else
assert( m_param.has_value() );
#endif
T param;
@ -452,13 +448,9 @@ public:
}
catch( const std::bad_any_cast& e )
{
#ifdef WX_COMPATIBILITY
wxASSERT_MSG( false,
wxString::Format( "Requested parameter type %s from event with parameter type %s.",
typeid(T).name(), m_param.type().name() ) );
#else
assert( false );
#endif
}
return param;