Core: Integrate warning suppression macro helpers

This commit is contained in:
Thaddeus Crews
2025-03-31 10:56:33 -05:00
parent 1f56d96cf2
commit 207a2b6472
25 changed files with 119 additions and 180 deletions

View File

@@ -76,11 +76,10 @@ DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode
RenderingContextDriverVulkanIOS::WindowPlatformData vulkan;
#endif
#ifdef METAL_ENABLED
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wunguarded-availability")
// Eliminate "RenderingContextDriverMetal is only available on iOS 14.0 or newer".
RenderingContextDriverMetal::WindowPlatformData metal;
#pragma clang diagnostic pop
GODOT_CLANG_WARNING_POP
#endif
} wpd;

View File

@@ -82,10 +82,9 @@ static const float earth_gravity = 9.80665;
layer = [GodotMetalLayer layer];
#endif
} else if ([driverName isEqualToString:@"opengl3"]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in iOS 12.0
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wdeprecated-declarations") // OpenGL is deprecated in iOS 12.0.
layer = [GodotOpenGLLayer layer];
#pragma clang diagnostic pop
GODOT_CLANG_WARNING_POP
} else {
return nil;
}