Backends: Fixes zealous warnings (#5760)

This commit is contained in:
ocornut
2023-03-23 18:17:45 +01:00
parent 7dcf129b3b
commit 8a6911b894
5 changed files with 47 additions and 2 deletions

View File

@ -72,6 +72,12 @@
#include "imgui.h"
#include "imgui_impl_sdl2.h"
// Clang warnings with -Weverything
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
#endif
// SDL
#include <SDL.h>
#include <SDL_syswm.h>
@ -632,3 +638,7 @@ void ImGui_ImplSDL2_NewFrame()
// Update game controllers (if enabled and available)
ImGui_ImplSDL2_UpdateGamepads();
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif