diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 15:51:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 16:03:51 +0300 |
commit | f0c991a380e9d449ebc02cc91649ef3728848070 (patch) | |
tree | 52b32ea8839229ddbcf1eb9c6c7ada30bed17804 /intern/ghost | |
parent | 924fe50e97cd4cc130d96f0c4f23664052c31458 (diff) |
Cleanup: work around clang-format differences between versions
Ref T73747
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_ContextCGL.mm | 6 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm index df750fc50f6..e2e74a3113b 100644 --- a/intern/ghost/intern/GHOST_ContextCGL.mm +++ b/intern/ghost/intern/GHOST_ContextCGL.mm @@ -34,7 +34,9 @@ static void ghost_fatal_error_dialog(const char *msg) { + /* clang-format off */ @autoreleasepool { + /* clang-format on */ NSString *message = [NSString stringWithFormat:@"Error opening window:\n%s", msg]; NSAlert *alert = [[NSAlert alloc] init]; @@ -335,7 +337,9 @@ static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA; void GHOST_ContextCGL::metalInit() { + /* clang-format off */ @autoreleasepool { + /* clang-format on */ id<MTLDevice> device = m_metalLayer.device; // Create a command queue for blit/present operation @@ -530,7 +534,9 @@ void GHOST_ContextCGL::metalUpdateFramebuffer() void GHOST_ContextCGL::metalSwapBuffers() { + /* clang-format off */ @autoreleasepool { + /* clang-format on */ updateDrawingContext(); glFlush(); diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index c40b6445348..81eb27a129a 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -952,7 +952,9 @@ static NSCursor *getImageCursor(GHOST_TStandardCursor shape, NSString *name, NSP const int index = (int)shape; if (!loaded[index]) { /* Load image from file in application Resources folder. */ + /* clang-format off */ @autoreleasepool { + /* clang-format on */ NSImage *image = [NSImage imageNamed:name]; if (image != NULL) { cursors[index] = [[NSCursor alloc] initWithImage:image hotSpot:hotspot]; |