Cleanup: redundant NULL checks

Also use unsigned shifting for values not in int range.
This commit is contained in:
2018-12-01 19:36:57 +11:00
parent 0f5b53ba4d
commit 40f45a7eac
8 changed files with 9 additions and 14 deletions

View File

@@ -432,7 +432,7 @@ static TriTessFace *mesh_calc_tri_tessface(
me->totloop, me->totpoly,
looptri);
const float *precomputed_normals = me ? CustomData_get_layer(&me->pdata, CD_NORMAL) : NULL;
const float *precomputed_normals = CustomData_get_layer(&me->pdata, CD_NORMAL);
const bool calculate_normal = precomputed_normals ? false : true;
for (i = 0; i < tottri; i++) {