Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-22 02:19:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-22 12:48:16 +0300
commit620b960d3d8cfd90b9f0df6ba3671c33eccb8309 (patch)
tree64f69db4bf9d44f0a32d1c92b0714bf2dc98ff2d /source/blender/editors/mesh/mesh_mirror.c
parentbba60bb564cf5a16cfcac744d4ba82cf8eba3da9 (diff)
Cleanup: style, use braces for editors
Diffstat (limited to 'source/blender/editors/mesh/mesh_mirror.c')
-rw-r--r--source/blender/editors/mesh/mesh_mirror.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/mesh_mirror.c b/source/blender/editors/mesh/mesh_mirror.c
index 7d0ee19b5ea..eec0c4a57fa 100644
--- a/source/blender/editors/mesh/mesh_mirror.c
+++ b/source/blender/editors/mesh/mesh_mirror.c
@@ -50,8 +50,9 @@ int ED_mesh_mirror_spatial_table(
Object *ob, BMEditMesh *em, Mesh *me_eval, const float co[3], char mode)
{
if (mode == 'u') { /* use table */
- if (MirrKdStore.tree == NULL)
+ if (MirrKdStore.tree == NULL) {
ED_mesh_mirror_spatial_table(ob, em, me_eval, NULL, 's');
+ }
if (MirrKdStore.tree) {
KDTreeNearest_3d nearest;
@@ -70,8 +71,9 @@ int ED_mesh_mirror_spatial_table(
const bool use_em = (!me_eval && em && me->edit_mesh == em);
const int totvert = use_em ? em->bm->totvert : me_eval ? me_eval->totvert : me->totvert;
- if (MirrKdStore.tree) /* happens when entering this call without ending it */
+ if (MirrKdStore.tree) { /* happens when entering this call without ending it */
ED_mesh_mirror_spatial_table(ob, em, me_eval, co, 'e');
+ }
MirrKdStore.tree = BLI_kdtree_3d_new(totvert);
@@ -126,19 +128,23 @@ typedef struct MirrTopoVert_t {
static int mirrtopo_hash_sort(const void *l1, const void *l2)
{
- if ((MirrTopoHash_t)(intptr_t)l1 > (MirrTopoHash_t)(intptr_t)l2)
+ if ((MirrTopoHash_t)(intptr_t)l1 > (MirrTopoHash_t)(intptr_t)l2) {
return 1;
- else if ((MirrTopoHash_t)(intptr_t)l1 < (MirrTopoHash_t)(intptr_t)l2)
+ }
+ else if ((MirrTopoHash_t)(intptr_t)l1 < (MirrTopoHash_t)(intptr_t)l2) {
return -1;
+ }
return 0;
}
static int mirrtopo_vert_sort(const void *v1, const void *v2)
{
- if (((MirrTopoVert_t *)v1)->hash > ((MirrTopoVert_t *)v2)->hash)
+ if (((MirrTopoVert_t *)v1)->hash > ((MirrTopoVert_t *)v2)->hash) {
return 1;
- else if (((MirrTopoVert_t *)v1)->hash < ((MirrTopoVert_t *)v2)->hash)
+ }
+ else if (((MirrTopoVert_t *)v1)->hash < ((MirrTopoVert_t *)v2)->hash) {
return -1;
+ }
return 0;
}