[Bf-blender-cvs] [93eb460dd0a] master: Cleanup: clang-format (re-run after v12 version bump)

Campbell Barton noreply at git.blender.org
Fri Jul 30 08:24:34 CEST 2021


Commit: 93eb460dd0aca4de33bf780de76eee319c224bae
Author: Campbell Barton
Date:   Fri Jul 30 16:19:19 2021 +1000
Branches: master
https://developer.blender.org/rB93eb460dd0aca4de33bf780de76eee319c224bae

Cleanup: clang-format (re-run after v12 version bump)

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

M	intern/cycles/device/device_cpu.cpp
M	intern/cycles/kernel/closure/bssrdf.h
M	intern/cycles/kernel/filter/filter_defines.h
M	intern/cycles/render/graph.h
M	intern/cycles/render/scene.h
M	intern/cycles/util/util_avxb.h
M	intern/cycles/util/util_avxi.h
M	intern/cycles/util/util_sseb.h
M	intern/cycles/util/util_ssei.h
M	intern/ghost/intern/GHOST_ContextWGL.cpp
M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	intern/ghost/intern/GHOST_SystemX11.cpp
M	source/blender/blenkernel/BKE_mesh_mapping.h
M	source/blender/blenkernel/intern/anim_sys.c
M	source/blender/blenlib/BLI_alloca.h
M	source/blender/blenlib/BLI_linear_allocator.hh
M	source/blender/blenlib/BLI_map.hh
M	source/blender/blenlib/BLI_map_slots.hh
M	source/blender/blenlib/BLI_resource_scope.hh
M	source/blender/blenlib/BLI_stack.hh
M	source/blender/blenlib/BLI_vector.hh
M	source/blender/blenlib/intern/array_store.c
M	source/blender/blenlib/intern/fileops.c
M	source/blender/blenlib/intern/math_base_inline.c
M	source/blender/blenlib/intern/math_color.c
M	source/blender/blenloader/intern/versioning_defaults.c
M	source/blender/datatoc/datatoc_icon.c
M	source/blender/draw/engines/eevee/eevee_cryptomatte.c
M	source/blender/draw/engines/eevee/eevee_volumes.c
M	source/blender/draw/engines/gpencil/gpencil_cache_utils.c
M	source/blender/draw/engines/overlay/overlay_armature.c
M	source/blender/draw/intern/draw_manager_data.c
M	source/blender/editors/animation/anim_channels_defines.c
M	source/blender/editors/animation/anim_markers.c
M	source/blender/editors/armature/armature_edit.c
M	source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
M	source/blender/editors/interface/interface_draw.c
M	source/blender/editors/mesh/editmesh_loopcut.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/transform/transform_gizmo_3d.c
M	source/blender/functions/FN_generic_virtual_array.hh
M	source/blender/imbuf/intern/png.c
M	source/blender/makesdna/DNA_fluid_types.h
M	source/blender/makesdna/DNA_mesh_types.h
M	source/blender/nodes/NOD_node_tree_multi_function.hh
M	source/blender/windowmanager/WM_api.h

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

diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 0e3c771dbc3..4a6e77d6eaa 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -57,8 +57,8 @@
 #include "util/util_function.h"
 #include "util/util_logging.h"
 #include "util/util_map.h"
-#include "util/util_openimagedenoise.h"
 #include "util/util_opengl.h"
+#include "util/util_openimagedenoise.h"
 #include "util/util_optimization.h"
 #include "util/util_progress.h"
 #include "util/util_system.h"
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h
index de65451d82c..562daf1286d 100644
--- a/intern/cycles/kernel/closure/bssrdf.h
+++ b/intern/cycles/kernel/closure/bssrdf.h
@@ -432,9 +432,9 @@ ccl_device void bssrdf_sample(const ShaderClosure *sc, float xi, float *r, float
   xi *= bssrdf->channels;
 
   if (xi < 1.0f) {
-    radius = (bssrdf->radius.x > 0.0f) ?
-                 bssrdf->radius.x :
-                 (bssrdf->radius.y > 0.0f) ? bssrdf->radius.y : bssrdf->radius.z;
+    radius = (bssrdf->radius.x > 0.0f) ? bssrdf->radius.x :
+             (bssrdf->radius.y > 0.0f) ? bssrdf->radius.y :
+                                         bssrdf->radius.z;
   }
   else if (xi < 2.0f) {
     xi -= 1.0f;
diff --git a/intern/cycles/kernel/filter/filter_defines.h b/intern/cycles/kernel/filter/filter_defines.h
index 0e51eeef92f..1c0ac5e2cb7 100644
--- a/intern/cycles/kernel/filter/filter_defines.h
+++ b/intern/cycles/kernel/filter/filter_defines.h
@@ -52,15 +52,14 @@ typedef struct TileInfo {
         tile_buffer_6, tile_buffer_7, tile_buffer_8, tile_buffer_9
 #  define ccl_get_tile_buffer(id) \
     (id == 0 ? tile_buffer_1 : \
-               id == 1 ? \
-               tile_buffer_2 : \
-               id == 2 ? \
-               tile_buffer_3 : \
-               id == 3 ? tile_buffer_4 : \
-                         id == 4 ? tile_buffer_5 : \
-                                   id == 5 ? tile_buffer_6 : \
-                                             id == 6 ? tile_buffer_7 : \
-                                                       id == 7 ? tile_buffer_8 : tile_buffer_9)
+     id == 1 ? tile_buffer_2 : \
+     id == 2 ? tile_buffer_3 : \
+     id == 3 ? tile_buffer_4 : \
+     id == 4 ? tile_buffer_5 : \
+     id == 5 ? tile_buffer_6 : \
+     id == 6 ? tile_buffer_7 : \
+     id == 7 ? tile_buffer_8 : \
+               tile_buffer_9)
 #else
 #  ifdef __KERNEL_CUDA__
 #    define CCL_FILTER_TILE_INFO ccl_global TileInfo *tile_info
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index 24de06123ca..5102b182593 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -356,7 +356,7 @@ class ShaderGraph : public NodeOwner {
   /* This function is used to create a node of a specified type instead of
    * calling 'new', and sets the graph as the owner of the node.
    */
-  template<typename T, typename... Args> T *create_node(Args &&... args)
+  template<typename T, typename... Args> T *create_node(Args &&...args)
   {
     T *node = new T(args...);
     node->set_owner(this);
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h
index 2e7fe50d5cf..7d8a6774381 100644
--- a/intern/cycles/render/scene.h
+++ b/intern/cycles/render/scene.h
@@ -299,7 +299,7 @@ class Scene : public NodeOwner {
    * node array (e.g. Scene::geometry for Geometry nodes) and tag the appropriate
    * manager for an update.
    */
-  template<typename T, typename... Args> T *create_node(Args &&... args)
+  template<typename T, typename... Args> T *create_node(Args &&...args)
   {
     T *node = new T(args...);
     node->set_owner(this);
diff --git a/intern/cycles/util/util_avxb.h b/intern/cycles/util/util_avxb.h
index 17d505c077a..15215d04ca3 100644
--- a/intern/cycles/util/util_avxb.h
+++ b/intern/cycles/util/util_avxb.h
@@ -57,7 +57,7 @@ struct avxb {
       : m256(_mm256_insertf128_ps(_mm256_castps128_ps256(a), b, 1))
   {
   }
-  __forceinline operator const __m256 &(void)const
+  __forceinline operator const __m256 &(void) const
   {
     return m256;
   }
diff --git a/intern/cycles/util/util_avxi.h b/intern/cycles/util/util_avxi.h
index 3db646e61f4..0ae4bf271c8 100644
--- a/intern/cycles/util/util_avxi.h
+++ b/intern/cycles/util/util_avxi.h
@@ -54,7 +54,7 @@ struct avxi {
   __forceinline avxi(const __m256i a) : m256(a)
   {
   }
-  __forceinline operator const __m256i &(void)const
+  __forceinline operator const __m256i &(void) const
   {
     return m256;
   }
diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h
index 4dbd5b8046e..6afce4f8909 100644
--- a/intern/cycles/util/util_sseb.h
+++ b/intern/cycles/util/util_sseb.h
@@ -57,7 +57,7 @@ struct sseb {
   __forceinline sseb(const __m128 input) : m128(input)
   {
   }
-  __forceinline operator const __m128 &(void)const
+  __forceinline operator const __m128 &(void) const
   {
     return m128;
   }
diff --git a/intern/cycles/util/util_ssei.h b/intern/cycles/util/util_ssei.h
index cd51dbff2f1..94412fb77e7 100644
--- a/intern/cycles/util/util_ssei.h
+++ b/intern/cycles/util/util_ssei.h
@@ -57,7 +57,7 @@ struct ssei {
   __forceinline ssei(const __m128i a) : m128(a)
   {
   }
-  __forceinline operator const __m128i &(void)const
+  __forceinline operator const __m128i &(void) const
   {
     return m128;
   }
diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index b5b3fab838d..3d1b78f864f 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -475,16 +475,15 @@ int GHOST_ContextWGL::choose_pixel_format(bool stereoVisual, bool needAlpha)
   PIXELFORMATDESCRIPTOR preferredPFD = {
       sizeof(PIXELFORMATDESCRIPTOR), /* size */
       1,                             /* version */
-      (DWORD)(
-          PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW |
-          PFD_DOUBLEBUFFER |                /* support double-buffering */
-          (stereoVisual ? PFD_STEREO : 0) | /* support stereo */
-          (
+      (DWORD)(PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW |
+              PFD_DOUBLEBUFFER |                /* support double-buffering */
+              (stereoVisual ? PFD_STEREO : 0) | /* support stereo */
+              (
 #ifdef WIN32_COMPOSITING
-              needAlpha ?
-                  PFD_SUPPORT_COMPOSITION : /* support composition for transparent background */
+                  needAlpha ? PFD_SUPPORT_COMPOSITION : /* support composition for transparent
+                                                             background */
 #endif
-                  0)),
+                      0)),
       PFD_TYPE_RGBA,               /* color type */
       (BYTE)(needAlpha ? 32 : 24), /* preferred color depth */
       0,
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index f2ed981751c..694efaaaf03 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -2111,10 +2111,9 @@ GHOST_TSuccess GHOST_SystemWin32::showMessageBox(const char *title,
   config.cbSize = sizeof(config);
   config.hInstance = 0;
   config.dwCommonButtons = 0;
-  config.pszMainIcon = (dialog_options & GHOST_DialogError ?
-                            TD_ERROR_ICON :
-                            dialog_options & GHOST_DialogWarning ? TD_WARNING_ICON :
-                                                                   TD_INFORMATION_ICON);
+  config.pszMainIcon = (dialog_options & GHOST_DialogError   ? TD_ERROR_ICON :
+                        dialog_options & GHOST_DialogWarning ? TD_WARNING_ICON :
+                                                               TD_INFORMATION_ICON);
   config.pszWindowTitle = L"Blender";
   config.pszMainInstruction = title_16;
   config.pszContent = message_16;
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 7af42e0c5bb..9fcad8aabf7 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1189,9 +1189,9 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
         else {
           printf("Bad keycode lookup. Keysym 0x%x Status: %s\n",
                  (unsigned int)key_sym,
-                 (status == XLookupNone ?
-                      "XLookupNone" :
-                      status == XLookupKeySym ? "XLookupKeySym" : "Unknown status"));
+                 (status == XLookupNone   ? "XLookupNone" :
+                  status == XLookupKeySym ? "XLookupKeySym" :
+                                            "Unknown status"));
 
           printf("'%.*s' %p %p\n", len, utf8_buf, xic, m_xim);
         }
diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h
index 327c13c7ce4..0518f303744 100644
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@ -249,7 +249,10 @@ int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge,
   ((CHECK_TYPE_ANY( \
         _tri, unsigned int *, int *, int[3], const unsigned int *, const int *, const int[3]), \
     CHECK_TYPE_ANY(_v, unsigned int, const unsigned int, int, const int)), \
-   (((_tri)[0] == _v) ? 0 : ((_tri)[1] == _v) ? 1 : ((_tri)[2] == _v) ? 2 : -1))
+   (((_tri)[0] == _v) ? 0 : \
+    ((_tri)[1] == _v) ? 1 : \
+    ((_tri)[2] == _v) ? 2 : \
+                        -1))
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index ffc060bb64e..fae75762cde 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -148,8 +148,11 @@ KeyingSet *BKE_keyingset_add(
   /* allocate new KeyingSet */
   ks = MEM_callocN(sizeof(KeyingSet), "KeyingSet");
 
-  BLI_strncpy(
-      ks->idname, (idname) ? idname : (name) ? name : DATA_("KeyingSet"), sizeof(ks->idname));
+  BLI_strncpy(ks->idname,
+              (idname) ? idname :
+              (name)   ? name :
+                         DATA_("KeyingSet"),
+              sizeof(ks->idname));
   BLI_strncpy(ks->name, (name) ? name : (idname) ? idname : DATA_("Keying Set"), s

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list