mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Remove breaks under return
This commit is contained in:
committed by
Sam Lantinga
parent
80ff0f45fd
commit
18185e30e9
@@ -219,7 +219,6 @@ static SDL_AppResult handle_key_event_(SnakeContext *ctx, SDL_Scancode key_code)
|
||||
case SDL_SCANCODE_ESCAPE:
|
||||
case SDL_SCANCODE_Q:
|
||||
return SDL_APP_SUCCESS;
|
||||
break;
|
||||
/* Restart the game as if the program was launched. */
|
||||
case SDL_SCANCODE_R:
|
||||
snake_initialize(ctx);
|
||||
@@ -359,7 +358,6 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
|
||||
switch (event->type) {
|
||||
case SDL_EVENT_QUIT:
|
||||
return SDL_APP_SUCCESS;
|
||||
break;
|
||||
case SDL_EVENT_JOYSTICK_ADDED:
|
||||
if (joystick == NULL) {
|
||||
joystick = SDL_OpenJoystick(event->jdevice.which);
|
||||
@@ -376,10 +374,8 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
|
||||
break;
|
||||
case SDL_EVENT_JOYSTICK_HAT_MOTION:
|
||||
return handle_hat_event_(ctx, event->jhat.value);
|
||||
break;
|
||||
case SDL_EVENT_KEY_DOWN:
|
||||
return handle_key_event_(ctx, event->key.scancode);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user