From d8a03c77d796db4ae2546fbcbe230dbf4846b0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 3 May 2018 15:42:55 +0200 Subject: Allocate/free meshes with generic library functions. This avoids the need to use Mesh-specific functions, and makes allocation and freeing easy oneliners. --- source/blender/modifiers/intern/MOD_mirror.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_mirror.c') diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 78a2f43c8e2..4edfbd43d7a 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -39,6 +39,7 @@ #include "BLI_math.h" +#include "BKE_library.h" #include "BKE_library_query.h" #include "BKE_mesh.h" #include "BKE_modifier.h" @@ -313,8 +314,7 @@ static Mesh *mirrorModifier__doMirror(MirrorModifierData *mmd, result = doMirrorOnAxis(mmd, ob, result, 1); if (tmp != mesh) { /* free intermediate results */ - BKE_mesh_free(tmp); - MEM_freeN(tmp); + BKE_id_free(NULL, tmp); } } if (mmd->flag & MOD_MIR_AXIS_Z) { @@ -322,8 +322,7 @@ static Mesh *mirrorModifier__doMirror(MirrorModifierData *mmd, result = doMirrorOnAxis(mmd, ob, result, 2); if (tmp != mesh) { /* free intermediate results */ - BKE_mesh_free(tmp); - MEM_freeN(tmp); + BKE_id_free(NULL, tmp); } } -- cgit v1.2.3