mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-21 05:45:34 +00:00
Backends: fixed misc zealous Clang warnings.
This commit is contained in:
@@ -101,8 +101,10 @@
|
||||
// Clang warnings with -Weverything
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
|
||||
#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
|
||||
#pragma clang diagnostic ignored "-Wsign-conversion" // warning: implicit conversion changes signedness
|
||||
#pragma clang diagnostic ignored "-Wexit-time-destructors" // warning: declaration requires an exit-time destructor // exit-time destruction order is undefined. if MemFree() leads to users code that has been disabled before exit it might cause problems. ImGui coding style welcomes static/globals.
|
||||
#pragma clang diagnostic ignored "-Wglobal-constructors" // warning: declaration requires a global destructor // similar to above, not sure what the exact difference is.
|
||||
#endif
|
||||
|
||||
// GLFW
|
||||
@@ -957,8 +959,8 @@ static void ImGui_ImplGlfw_GetWindowSizeAndFramebufferScale(GLFWwindow* window,
|
||||
int display_w, display_h;
|
||||
glfwGetWindowSize(window, &w, &h);
|
||||
glfwGetFramebufferSize(window, &display_w, &display_h);
|
||||
float fb_scale_x = (w > 0) ? (float)display_w / w : 1.0f;
|
||||
float fb_scale_y = (h > 0) ? (float)display_h / h : 1.0f;
|
||||
float fb_scale_x = (w > 0) ? (float)display_w / (float)w : 1.0f;
|
||||
float fb_scale_y = (h > 0) ? (float)display_h / (float)h : 1.0f;
|
||||
#if GLFW_HAS_X11_OR_WAYLAND
|
||||
ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(window);
|
||||
if (!bd->IsWayland)
|
||||
|
||||
Reference in New Issue
Block a user