[Bf-blender-cvs] [7ae85b54d72] master: Cleanup: clang-format

Campbell Barton noreply at git.blender.org
Fri Sep 27 04:46:36 CEST 2019


Commit: 7ae85b54d7214ca9cfafa1fed4fdd7f449163474
Author: Campbell Barton
Date:   Fri Sep 27 12:37:53 2019 +1000
Branches: master
https://developer.blender.org/rB7ae85b54d7214ca9cfafa1fed4fdd7f449163474

Cleanup: clang-format

===================================================================

M	intern/ghost/intern/GHOST_ContextCGL.mm
M	intern/ghost/intern/GHOST_SystemCocoa.mm
M	source/blender/blenlib/BLI_map.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 0fca41306a6..12c340ffe97 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -34,8 +34,7 @@
 
 static void ghost_fatal_error_dialog(const char *msg)
 {
-  @autoreleasepool
-  {
+  @autoreleasepool {
     NSString *message = [NSString stringWithFormat:@"Error opening window:\n%s", msg];
 
     NSAlert *alert = [[NSAlert alloc] init];
@@ -338,8 +337,7 @@ static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA;
 
 void GHOST_ContextCGL::metalInit()
 {
-  @autoreleasepool
-  {
+  @autoreleasepool {
     id<MTLDevice> device = m_metalLayer.device;
 
     // Create a command queue for blit/present operation
@@ -534,8 +532,7 @@ void GHOST_ContextCGL::metalUpdateFramebuffer()
 
 void GHOST_ContextCGL::metalSwapBuffers()
 {
-  @autoreleasepool
-  {
+  @autoreleasepool {
     updateDrawingContext();
     glFlush();
 
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index ae6ff897310..2026c1b7b4f 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1362,8 +1362,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
 
   // Check open windows if some changes are not saved
   if (m_windowManager->getAnyModifiedState()) {
-    @autoreleasepool
-    {
+    @autoreleasepool {
       NSAlert *alert = [[NSAlert alloc] init];
       NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]];
       NSString *text = @"Current document has not been saved.\nDo you really want to proceed?";
diff --git a/source/blender/blenlib/BLI_map.h b/source/blender/blenlib/BLI_map.h
index 3e934480b94..1edf7653c71 100644
--- a/source/blender/blenlib/BLI_map.h
+++ b/source/blender/blenlib/BLI_map.h
@@ -624,15 +624,16 @@ template<typename KeyT, typename ValueT, typename Allocator = GuardedAllocator>
   template<typename ForwardKeyT, typename ForwardValueT>
   bool add_override__impl(ForwardKeyT &&key, ForwardValueT &&value)
   {
-    return this->add_or_modify(std::forward<ForwardKeyT>(key),
-                               [&](ValueT *dst) {
-                                 new (dst) ValueT(std::forward<ForwardValueT>(value));
-                                 return true;
-                               },
-                               [&](ValueT *old_value) {
-                                 *old_value = std::forward<ForwardValueT>(value);
-                                 return false;
-                               });
+    return this->add_or_modify(
+        std::forward<ForwardKeyT>(key),
+        [&](ValueT *dst) {
+          new (dst) ValueT(std::forward<ForwardValueT>(value));
+          return true;
+        },
+        [&](ValueT *old_value) {
+          *old_value = std::forward<ForwardValueT>(value);
+          return false;
+        });
   }
 
   template<typename ForwardKeyT, typename ForwardValueT>



More information about the Bf-blender-cvs mailing list