Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-02 10:46:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-02 10:51:27 +0400
commitf64ae4cbe5a724496624de9e479c04f325613be5 (patch)
tree9631ba79b3c54ac3f6fa0619dff490e724ff1f94 /source/blender/editors/sculpt_paint
parent4436620150f2884a0b4b9e417b08e19f8a797a86 (diff)
MemArena: use size_t instead of int for alloc args and internal storage.
also add BLI_memarena_calloc to be used when calloc isnt enabled for the arena.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 88cc954fb17..59f398a8719 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3294,8 +3294,7 @@ static void project_paint_begin(ProjPaintState *ps)
projIma->ima = node->link;
projIma->touch = 0;
projIma->ibuf = BKE_image_acquire_ibuf(projIma->ima, NULL, NULL);
- projIma->partRedrawRect = BLI_memarena_alloc(arena, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED);
- memset(projIma->partRedrawRect, 0, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED);
+ projIma->partRedrawRect = BLI_memarena_calloc(arena, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED);
}
/* we have built the array, discard the linked list */
@@ -3344,8 +3343,7 @@ static void project_paint_end(ProjPaintState *ps)
for (a = 0, last_projIma = ps->projImages; a < ps->image_tot; a++, last_projIma++) {
int size = sizeof(void **) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->y);
- last_projIma->undoRect = (void **) BLI_memarena_alloc(arena, size);
- memset(last_projIma->undoRect, 0, size);
+ last_projIma->undoRect = (void **) BLI_memarena_calloc(arena, size);
last_projIma->ibuf->userflags |= IB_BITMAPDIRTY;
}