Disable clang-format for objective-C bits in GHOST.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 17 Apr 2019 08:56:11 +0000 (10:56 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 17 Apr 2019 09:23:22 +0000 (11:23 +0200)
Pre-8 versions of clang-format do not handle objective-C very well,
leading to unwanted changes when re-running the edits.

intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_WindowCocoa.mm

index 4c9c745..903fe4a 100644 (file)
@@ -354,6 +354,7 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
   }
 }
 
+/* clang-format off */
 #pragma mark Cocoa objects
 
 /**
@@ -497,6 +498,8 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
 
 #pragma mark initialization/finalization
 
+/* clang-format on */
+
 GHOST_SystemCocoa::GHOST_SystemCocoa()
 {
   int mib[2];
index 46343e1..a73c818 100644 (file)
@@ -32,6 +32,8 @@
 
 #include <sys/sysctl.h>
 
+/* clang-format off */
+
 #pragma mark Cocoa window delegate object
 
 @interface CocoaWindowDelegate : NSObject <NSWindowDelegate>
 
 #pragma mark initialization / finalization
 
+/* clang-format on */
+
 GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
                                      const STR_String &title,
                                      GHOST_TInt32 left,