Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-15 15:51:46 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-02-15 16:03:51 +0300
commitf0c991a380e9d449ebc02cc91649ef3728848070 (patch)
tree52b32ea8839229ddbcf1eb9c6c7ada30bed17804 /intern/ghost
parent924fe50e97cd4cc130d96f0c4f23664052c31458 (diff)
Cleanup: work around clang-format differences between versions
Ref T73747
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.mm6
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm2
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];