mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-22 06:16:34 +00:00
Backends: further zealous warning fixes. (#9247)
This commit is contained in:
@@ -24,6 +24,12 @@
|
|||||||
#include <dxgiformat.h> // DXGI_FORMAT
|
#include <dxgiformat.h> // DXGI_FORMAT
|
||||||
#include <d3d12.h> // D3D12_CPU_DESCRIPTOR_HANDLE
|
#include <d3d12.h> // D3D12_CPU_DESCRIPTOR_HANDLE
|
||||||
|
|
||||||
|
// Clang/GCC warnings with -Weverything
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialization data, for ImGui_ImplDX12_Init()
|
// Initialization data, for ImGui_ImplDX12_Init()
|
||||||
struct ImGui_ImplDX12_InitInfo
|
struct ImGui_ImplDX12_InitInfo
|
||||||
{
|
{
|
||||||
@@ -76,4 +82,8 @@ struct ImGui_ImplDX12_RenderState
|
|||||||
ID3D12GraphicsCommandList* CommandList;
|
ID3D12GraphicsCommandList* CommandList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef IMGUI_DISABLE
|
#endif // #ifndef IMGUI_DISABLE
|
||||||
|
|||||||
@@ -116,6 +116,14 @@
|
|||||||
#pragma warning (disable: 4127) // condition expression is constant
|
#pragma warning (disable: 4127) // condition expression is constant
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Clang/GCC warnings with -Weverything
|
||||||
|
#if defined(__clang__)
|
||||||
|
#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 "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
|
||||||
|
#pragma clang diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
struct ImGui_ImplVulkan_FrameRenderBuffers;
|
struct ImGui_ImplVulkan_FrameRenderBuffers;
|
||||||
struct ImGui_ImplVulkan_WindowRenderBuffers;
|
struct ImGui_ImplVulkan_WindowRenderBuffers;
|
||||||
|
|||||||
@@ -50,6 +50,12 @@
|
|||||||
//#define IMGUI_IMPL_VULKAN_VOLK_FILENAME <volk.h> // Default
|
//#define IMGUI_IMPL_VULKAN_VOLK_FILENAME <volk.h> // Default
|
||||||
// Reminder: make those changes in your imconfig.h file, not here!
|
// Reminder: make those changes in your imconfig.h file, not here!
|
||||||
|
|
||||||
|
// Clang/GCC warnings with -Weverything
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(IMGUI_IMPL_VULKAN_NO_PROTOTYPES) && !defined(VK_NO_PROTOTYPES)
|
#if defined(IMGUI_IMPL_VULKAN_NO_PROTOTYPES) && !defined(VK_NO_PROTOTYPES)
|
||||||
#define VK_NO_PROTOTYPES
|
#define VK_NO_PROTOTYPES
|
||||||
#endif
|
#endif
|
||||||
@@ -261,4 +267,8 @@ struct ImGui_ImplVulkanH_Window
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef IMGUI_DISABLE
|
#endif // #ifndef IMGUI_DISABLE
|
||||||
|
|||||||
Reference in New Issue
Block a user