[Bf-blender-cvs] [1a705fa139d] master: Cleanup: clang-format

Campbell Barton noreply at git.blender.org
Thu Feb 10 23:15:11 CET 2022


Commit: 1a705fa139d3c6204b0d31a84a5596df0f25c66f
Author: Campbell Barton
Date:   Fri Feb 11 09:10:56 2022 +1100
Branches: master
https://developer.blender.org/rB1a705fa139d3c6204b0d31a84a5596df0f25c66f

Cleanup: clang-format

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

M	intern/cycles/device/metal/device_impl.mm
M	source/blender/blenkernel/intern/gpencil_update_cache.c
M	source/blender/blenlib/intern/DLRB_tree.c
M	source/blender/depsgraph/intern/eval/deg_eval_runtime_backup.h
M	source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h
M	source/blender/makesdna/DNA_gpencil_types.h
M	source/blender/makesrna/intern/rna_gpencil.c

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

diff --git a/intern/cycles/device/metal/device_impl.mm b/intern/cycles/device/metal/device_impl.mm
index cdaafc60ab0..e761308b764 100644
--- a/intern/cycles/device/metal/device_impl.mm
+++ b/intern/cycles/device/metal/device_impl.mm
@@ -458,7 +458,8 @@ MetalDevice::MetalMem *MetalDevice::generic_alloc(device_memory &mem)
   id<MTLBuffer> metal_buffer = nil;
   MTLResourceOptions options = default_storage_mode;
 
-  /* Workaround for "bake" unit tests which fail if RenderBuffers is allocated with MTLResourceStorageModeShared. */
+  /* Workaround for "bake" unit tests which fail if RenderBuffers is allocated with
+   * MTLResourceStorageModeShared. */
   if (strstr(mem.name, "RenderBuffers")) {
     options = MTLResourceStorageModeManaged;
   }
@@ -769,9 +770,11 @@ void MetalDevice::tex_alloc(device_texture &mem)
   /* Check that dimensions fit within maximum allowable size.
      See https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
   */
-  if (mem.data_width > 16384 ||
-      mem.data_height > 16384) {
-    set_error(string_printf("Texture exceeds maximum allowed size of 16384 x 16384 (requested: %zu x %zu)", mem.data_width, mem.data_height));
+  if (mem.data_width > 16384 || mem.data_height > 16384) {
+    set_error(string_printf(
+        "Texture exceeds maximum allowed size of 16384 x 16384 (requested: %zu x %zu)",
+        mem.data_width,
+        mem.data_height));
     return;
   }
 
diff --git a/source/blender/blenkernel/intern/gpencil_update_cache.c b/source/blender/blenkernel/intern/gpencil_update_cache.c
index 323c3a9f2a2..6f079d6dc60 100644
--- a/source/blender/blenkernel/intern/gpencil_update_cache.c
+++ b/source/blender/blenkernel/intern/gpencil_update_cache.c
@@ -167,8 +167,11 @@ static void update_cache_node_create_ex(GPencilUpdateCache *root_cache,
   }
 
   GPencilUpdateCache *gps_cache = update_cache_alloc(gps_index, node_flag, (bGPDstroke *)data);
-  BLI_dlrbTree_add(
-      gpf_node->cache->children, cache_node_compare, cache_node_alloc, cache_node_update, gps_cache);
+  BLI_dlrbTree_add(gpf_node->cache->children,
+                   cache_node_compare,
+                   cache_node_alloc,
+                   cache_node_update,
+                   gps_cache);
 
   BLI_dlrbTree_linkedlist_sync(gpf_node->cache->children);
 }
diff --git a/source/blender/blenlib/intern/DLRB_tree.c b/source/blender/blenlib/intern/DLRB_tree.c
index 9c22afeb893..85ff5a6e46f 100644
--- a/source/blender/blenlib/intern/DLRB_tree.c
+++ b/source/blender/blenlib/intern/DLRB_tree.c
@@ -74,7 +74,7 @@ void BLI_dlrbTree_free(DLRBT_Tree *tree, DLRBT_NFree_FP free_cb)
   if (tree->first) {
     /* free list */
     if (free_cb) {
-      LISTBASE_FOREACH_MUTABLE(DLRBT_Node *, node, tree) {
+      LISTBASE_FOREACH_MUTABLE (DLRBT_Node *, node, tree) {
         free_cb(node);
       }
       BLI_listbase_clear((ListBase *)tree);
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup.h b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup.h
index c4f6bd954c0..5a215fbe1db 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup.h
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup.h
@@ -26,12 +26,12 @@
 #include "DNA_ID.h"
 
 #include "intern/eval/deg_eval_runtime_backup_animation.h"
+#include "intern/eval/deg_eval_runtime_backup_gpencil.h"
 #include "intern/eval/deg_eval_runtime_backup_movieclip.h"
 #include "intern/eval/deg_eval_runtime_backup_object.h"
 #include "intern/eval/deg_eval_runtime_backup_scene.h"
 #include "intern/eval/deg_eval_runtime_backup_sound.h"
 #include "intern/eval/deg_eval_runtime_backup_volume.h"
-#include "intern/eval/deg_eval_runtime_backup_gpencil.h"
 
 namespace blender {
 namespace deg {
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h
index baf0f6a6945..1234f1df37b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h
@@ -38,7 +38,7 @@ class GPencilBackup {
   void init_from_gpencil(bGPdata *gpd);
   void restore_to_gpencil(bGPdata *gpd);
 
-  const Depsgraph* depsgraph;
+  const Depsgraph *depsgraph;
 };
 
 }  // namespace deg
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 3340782d64a..727b8ea40e3 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -326,7 +326,8 @@ typedef struct bGPDstroke {
   /** Curve used to edit the stroke using Bezier handlers. */
   struct bGPDcurve *editcurve;
 
-  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_stroke_copy_settings as well! */
+  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_stroke_copy_settings as
+   * well! */
 
   bGPDstroke_Runtime runtime;
   void *_pad5;
@@ -412,7 +413,8 @@ typedef struct bGPDframe {
   /** Keyframe type (eBezTriple_KeyframeType). */
   short key_type;
 
-  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_frame_copy_settings as well! */
+  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_frame_copy_settings as
+   * well! */
 
   bGPDframe_Runtime runtime;
 } bGPDframe;
@@ -537,7 +539,8 @@ typedef struct bGPDlayer {
   float layer_mat[4][4], layer_invmat[4][4];
   char _pad3[4];
 
-  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_layer_copy_settings as well! */
+  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_layer_copy_settings as
+   * well! */
 
   bGPDlayer_Runtime runtime;
 } bGPDlayer;
@@ -735,7 +738,8 @@ typedef struct bGPdata {
 
   bGPgrid grid;
 
-  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_data_copy_settings as well! */
+  /* NOTE: When adding new members, make sure to add them to BKE_gpencil_data_copy_settings as
+   * well! */
 
   bGPdata_Runtime runtime;
 } bGPdata;
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index ff194e2c52a..ab887422d58 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -180,12 +180,12 @@ static const EnumPropertyItem rna_enum_gpencil_caps_modes_items[] = {
 
 static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
-#if 0
+#  if 0
   /* In case a property on a layer changed, tag it with a light update. */
   if (ptr->type == &RNA_GPencilLayer) {
     BKE_gpencil_tag_light_update((bGPdata *)(ptr->owner_id), (bGPDlayer *)(ptr->data), NULL, NULL);
   }
-#endif
+#  endif
   DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);
   WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }



More information about the Bf-blender-cvs mailing list