remove cellalloc, from my tests jemalloc beats cellalloc, so we better just use a...
[blender.git] / source / blender / editors / sculpt_paint / paint_vertex.c
index b7511367cc865f34ecca661697580695f8c390ad..46df6ad9b5b11428666d080b27d47f3527fae65f 100644 (file)
@@ -46,7 +46,6 @@
 #include "BLI_memarena.h"
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
-#include "BLI_cellalloc.h"
 
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
@@ -1634,7 +1633,7 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
        MDeformVert *dv= &me->dvert[index];
        MDeformVert dv_test= {NULL};
 
-       dv_test.dw= BLI_cellalloc_dupalloc(dv->dw);
+       dv_test.dw= MEM_dupallocN(dv->dw);
        dv_test.flag = dv->flag;
        dv_test.totweight = dv->totweight;
        /* do not multi-paint if a locked group is selected or the active group is locked
@@ -1665,19 +1664,19 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
                if(tdw->weight != oldw) {
                        if(neww > oldw) {
                                if(tdw->weight <= oldw) {
-                                       BLI_cellalloc_free(dv_test.dw);
+                                       MEM_freeN(dv_test.dw);
                                        return TRUE;
                                }
                        }
                        else {
                                if(tdw->weight >= oldw) {
-                                       BLI_cellalloc_free(dv_test.dw);
+                                       MEM_freeN(dv_test.dw);
                                        return TRUE;
                                }
                        }
                }
        }
-       BLI_cellalloc_free(dv_test.dw);
+       MEM_freeN(dv_test.dw);
        return FALSE;
 }
 
@@ -1864,7 +1863,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
                
                /* setup multi-paint */
                if (do_multipaint_totsel) {
-                       dv_copy.dw= BLI_cellalloc_dupalloc(dv->dw);
+                       dv_copy.dw= MEM_dupallocN(dv->dw);
                        dv_copy.flag = dv->flag;
                        dv_copy.totweight = dv->totweight;
                        tdw = dw;
@@ -1918,7 +1917,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
                        oldChange = 0;
                }
                if(dv_copy.dw) {
-                       BLI_cellalloc_free(dv_copy.dw);
+                       MEM_freeN(dv_copy.dw);
                }
 #if 0
                /* dv may have been altered greatly */