(ui_cocoa.m) Cleanups - add fall-throughs

This commit is contained in:
twinaphex 2021-03-08 15:19:26 +01:00
parent e140c9f8ee
commit 0b06eea846

View File

@ -246,30 +246,24 @@ static enum ui_msg_window_response ui_msg_window_cocoa_dialog(ui_msg_window_stat
switch (state->buttons)
{
case UI_MSG_WINDOW_OKCANCEL:
if (response == NSAlertSecondButtonReturn)
return UI_MSG_RESPONSE_CANCEL;
/* fall-through */
case UI_MSG_WINDOW_OK:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_OK;
break;
case UI_MSG_WINDOW_OKCANCEL:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_OK;
if (response == NSAlertSecondButtonReturn)
case UI_MSG_WINDOW_YESNOCANCEL:
if (response == NSAlertThirdButtonReturn)
return UI_MSG_RESPONSE_CANCEL;
break;
/* fall-through */
case UI_MSG_WINDOW_YESNO:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_YES;
if (response == NSAlertSecondButtonReturn)
return UI_MSG_RESPONSE_NO;
break;
case UI_MSG_WINDOW_YESNOCANCEL:
if (response == NSAlertFirstButtonReturn)
return UI_MSG_RESPONSE_YES;
if (response == NSAlertSecondButtonReturn)
return UI_MSG_RESPONSE_NO;
if (response == NSAlertThirdButtonReturn)
return UI_MSG_RESPONSE_CANCEL;
break;
}
return UI_MSG_RESPONSE_NA;