star-geometry-3d

Clean and decorate 3D geometries
git clone git://git.meso-star.fr/star-geometry-3d.git
Log | Files | Refs | README | LICENSE

commit 923c66f33eeb41c28c942271c7fd59c6fe6d37a0
parent 855c8d9c3ff4bddb8a7c59bc118ecc0146af1224
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Mon,  9 Dec 2019 10:39:02 +0100

Code simplifications

Diffstat:
Msrc/sg3_geometry.c | 5+----
Msrc/sg3_report.c | 6++----
2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/sg3_geometry.c b/src/sg3_geometry.c @@ -308,11 +308,8 @@ sg3_geometry_add } } } - if(geom->report && p_trgd->merge_conflict) { + if(geom->report && p_trgd->merge_conflict) if(!already_conflict) geom->report->merge_conflict_count++; - /* If merge_trg and we reached this line, merge_trg ruled no error */ - if(!merge_trg) goto error; - } if(res != RES_OK) goto error; /* Legit duplicate (or accepted by merge_triangle): replace undef media */ upd_ptr = darray_triangle_data_get(&geom->v_n_t->unique_triangles) diff --git a/src/sg3_report.c b/src/sg3_report.c @@ -235,7 +235,6 @@ sg3_report_validate_properties = darray_trg_descriptions_data_get(&report->trg_descriptions); report->properties_conflict_count = 0; /* Reset count */ FOR_EACH(i, 0, sz) { - int properties_conflict; unsigned props[3] = { SG3_UNDEFINED_PROPERTY, SG3_UNDEFINED_PROPERTY, SG3_UNDEFINED_PROPERTY }; struct trg_descriptions* trgd = trg_descriptions + i; @@ -246,10 +245,9 @@ sg3_report_validate_properties } /* Get non-conflicting properties */ /* Call vaildation */ - ERR(validate(i, props, ctx, &properties_conflict)); - if(properties_conflict) + ERR(validate(i, props, ctx, &trgd->properties_conflict)); + if(trgd->properties_conflict) report->properties_conflict_count++; - trgd->properties_conflict = properties_conflict; } exit: