Add default case in edit_label.cpp (-Wswitch)

This should never ben hit as it's defended against above,
but lack of a default causes lots of -Wswitch warnings, so
add an assert and a return.
This commit is contained in:
John Beard 2018-09-18 14:41:06 +01:00 committed by Jeff Young
parent 9dfcc839a4
commit 4a65df8281
1 changed files with 4 additions and 0 deletions

View File

@ -186,6 +186,10 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
case SCH_TEXT_T:
newtext = new SCH_TEXT( position, txt );
break;
default:
wxASSERT_MSG( false, wxString::Format( "Invalid text type: %d.", type ) );
return;
}
/* Copy the old text item settings to the new one. Justifications are not copied because