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

@ -40,8 +40,7 @@
#import <ApplicationServices/ApplicationServices.h>
#import <CoreVideo/CoreVideo.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wdeprecated-declarations") // OpenGL is deprecated in macOS 10.14.
typedef CGLError (*CGLEnablePtr)(CGLContextObj ctx, CGLContextEnable pname);
typedef CGLError (*CGLSetParameterPtr)(CGLContextObj ctx, CGLContextParameter pname, const GLint *params);
@ -89,6 +88,6 @@ public:
~GLManagerLegacy_MacOS();
};
#pragma clang diagnostic push
GODOT_CLANG_WARNING_PUSH
#endif // MACOS_ENABLED && GLES3_ENABLED

View File

@ -36,8 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wdeprecated-declarations") // OpenGL is deprecated in macOS 10.14.
Error GLManagerLegacy_MacOS::create_context(GLWindow &win) {
NSOpenGLPixelFormatAttribute attributes[] = {
@ -204,6 +203,6 @@ GLManagerLegacy_MacOS::~GLManagerLegacy_MacOS() {
release_current();
}
#pragma clang diagnostic pop
GODOT_CLANG_WARNING_POP
#endif // MACOS_ENABLED && GLES3_ENABLED

View File

@ -54,8 +54,7 @@
@end
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wdeprecated-declarations") // OpenGL is deprecated in macOS 10.14.
@interface GodotContentView : RootView <NSTextInputClient> {
DisplayServer::WindowID window_id;
@ -78,4 +77,4 @@
@end
#pragma clang diagnostic pop
GODOT_CLANG_WARNING_POP