7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00

Make tool framework assert more useful

This commit is contained in:
Ian McInerney 2025-02-20 13:44:43 +00:00
parent c18bc2472b
commit 9e9db8bd4d

View File

@ -79,7 +79,8 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction )
wxASSERT( aAction->GetName().find( '.', 0 ) != std::string::npos );
// TOOL_ACTIONs must have unique names & ids
wxASSERT( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() );
wxASSERT_MSG( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end(),
wxString::Format( "Action '%s' already registered", aAction->m_name ) );
m_actionNameIndex[aAction->m_name] = aAction;