From a5081896bc0416f9b64ae8e488bfe1cc2042ca7e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 Jan 2021 14:02:58 +1100 Subject: Cleanup: redundant code, minor inconsistencies - Remove ternary operators when both values are the same. - Remove break after return. - Remove redundant NULL checks for code which handles those cases immediately beforehand. --- source/blender/modifiers/intern/MOD_smooth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_smooth.c') diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index 618ccc78279..c5011ed15c1 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -106,9 +106,7 @@ static void smoothModifier_do( uint *num_accumulated_vecs = MEM_calloc_arrayN( (size_t)numVerts, sizeof(*num_accumulated_vecs), __func__); if (!num_accumulated_vecs) { - if (accumulated_vecs) { - MEM_freeN(accumulated_vecs); - } + MEM_freeN(accumulated_vecs); return; } -- cgit v1.2.3