From 5491c045af7b7f185a147bfe1ff34d88df431458 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 23 Apr 2020 12:06:05 +1000 Subject: [PATCH 1/2] Cleanup: add explicit enum values in DNA_rigidbody_types.h --- source/blender/makesdna/DNA_rigidbody_types.h | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h index 7ae97187c25..7ad50dc04de 100644 --- a/source/blender/makesdna/DNA_rigidbody_types.h +++ b/source/blender/makesdna/DNA_rigidbody_types.h @@ -172,7 +172,7 @@ typedef enum eRigidBodyOb_Type { /* active geometry participant in simulation. is directly controlled by sim */ RBO_TYPE_ACTIVE = 0, /* passive geometry participant in simulation. is directly controlled by animsys */ - RBO_TYPE_PASSIVE, + RBO_TYPE_PASSIVE = 1, } eRigidBodyOb_Type; /* Flags for RigidBodyOb */ @@ -200,18 +200,18 @@ typedef enum eRigidBody_Shape { /** Simple box (i.e. bounding box). */ RB_SHAPE_BOX = 0, /** Sphere. */ - RB_SHAPE_SPHERE, + RB_SHAPE_SPHERE = 1, /** Rounded "pill" shape (i.e. calcium tablets). */ - RB_SHAPE_CAPSULE, + RB_SHAPE_CAPSULE = 2, /** Cylinder (i.e. pringles can). */ - RB_SHAPE_CYLINDER, + RB_SHAPE_CYLINDER = 3, /** Cone (i.e. party hat). */ - RB_SHAPE_CONE, + RB_SHAPE_CONE = 4, /** Convex hull (minimal shrinkwrap encompassing all verts). */ - RB_SHAPE_CONVEXH, + RB_SHAPE_CONVEXH = 5, /** Triangulated mesh. */ - RB_SHAPE_TRIMESH, + RB_SHAPE_TRIMESH = 6, /* concave mesh approximated using primitives */ // RB_SHAPE_COMPOUND, @@ -221,9 +221,9 @@ typedef enum eRigidBody_MeshSource { /* base mesh */ RBO_MESH_BASE = 0, /* only deformations */ - RBO_MESH_DEFORM, + RBO_MESH_DEFORM = 1, /* final derived mesh */ - RBO_MESH_FINAL, + RBO_MESH_FINAL = 2, } eRigidBody_MeshSource; /* ******************************** */ @@ -333,7 +333,7 @@ typedef enum eRigidBodyCon_Type { /* Spring implementation type for RigidBodyOb */ typedef enum eRigidBodyCon_SpringType { RBC_SPRING_TYPE1 = 0, /* btGeneric6DofSpringConstraint */ - RBC_SPRING_TYPE2, /* btGeneric6DofSpring2Constraint */ + RBC_SPRING_TYPE2 = 1, /* btGeneric6DofSpring2Constraint */ } eRigidBodyCon_SpringType; /* Flags for RigidBodyCon */ From e812512e1d15125f5fc13aea27c173cde3a06470 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 23 Apr 2020 12:10:41 +1000 Subject: [PATCH 2/2] Cleanup: clang-format, unused warning --- intern/cycles/util/util_avxb.h | 2 +- intern/cycles/util/util_avxi.h | 2 +- intern/cycles/util/util_ssei.h | 2 +- source/blender/editors/uvedit/uvedit_ops.c | 6 ++++-- source/blender/makesrna/intern/rna_fluid.c | 3 +-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/intern/cycles/util/util_avxb.h b/intern/cycles/util/util_avxb.h index 34fafd188de..5c03b1d88d7 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 e658a4f848f..1b3810764b7 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_ssei.h b/intern/cycles/util/util_ssei.h index e2bf81310cc..a4db9193206 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/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 1a4df846a12..cb752613cf7 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -4899,7 +4899,8 @@ static int uv_reveal_exec(bContext *C, wmOperator *op) if (!stickymode) { BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { BM_elem_flag_disable(efa, BM_ELEM_TAG); - if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) { + if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && + !BM_elem_flag_test(efa, BM_ELEM_SELECT)) { int totsel = 0; BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { totsel += BM_elem_flag_test(l->v, BM_ELEM_SELECT); @@ -4919,7 +4920,8 @@ static int uv_reveal_exec(bContext *C, wmOperator *op) else { BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { BM_elem_flag_disable(efa, BM_ELEM_TAG); - if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) { + if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && + !BM_elem_flag_test(efa, BM_ELEM_SELECT)) { BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { if (BM_elem_flag_test(l->v, BM_ELEM_SELECT) == 0) { luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 8992e7d38bd..d89bdcd074f 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -174,9 +174,8 @@ static void rna_Fluid_domain_reset(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Fluid_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) { - FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; - # ifdef WITH_FLUID + FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; BKE_fluid_modifier_reset(settings->mmd); # endif