Browse Source

Remove breaks under return

DamianS-eng 1 month ago
parent
commit
18185e30e9
1 changed files with 0 additions and 4 deletions
  1. 0 4
      examples/demo/01-snake/snake.c

+ 0 - 4
examples/demo/01-snake/snake.c

@@ -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;
     }