mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Core: Integrate warning suppression macro helpers
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user