From 51e4cba909e7a442eed3fcb1080c7d757ea031de Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 11 Mar 2025 12:05:23 +0100 Subject: [PATCH] Backends: Fixed zealous warnings. --- backends/imgui_impl_sdl2.cpp | 2 +- backends/imgui_impl_sdl3.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_sdl2.cpp b/backends/imgui_impl_sdl2.cpp index 33f7fed06..0be2f2c6e 100644 --- a/backends/imgui_impl_sdl2.cpp +++ b/backends/imgui_impl_sdl2.cpp @@ -192,7 +192,6 @@ static void ImGui_ImplSDL2_PlatformSetImeData(ImGuiContext*, ImGuiViewport*, ImG ImGuiKey ImGui_ImplSDL2_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode scancode); ImGuiKey ImGui_ImplSDL2_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode scancode) { - IM_UNUSED(scancode); switch (keycode) { case SDLK_TAB: return ImGuiKey_Tab; @@ -332,6 +331,7 @@ ImGuiKey ImGui_ImplSDL2_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode sca case SDL_SCANCODE_COMMA: return ImGuiKey_Comma; case SDL_SCANCODE_PERIOD: return ImGuiKey_Period; case SDL_SCANCODE_SLASH: return ImGuiKey_Slash; + default: break; } return ImGuiKey_None; } diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index 6720899ef..cfe8bbd4e 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -313,6 +313,7 @@ ImGuiKey ImGui_ImplSDL3_KeyEventToImGuiKey(SDL_Keycode keycode, SDL_Scancode sca case SDL_SCANCODE_COMMA: return ImGuiKey_Comma; case SDL_SCANCODE_PERIOD: return ImGuiKey_Period; case SDL_SCANCODE_SLASH: return ImGuiKey_Slash; + default: break; } return ImGuiKey_None; }