diff options
| author | MenTaLguY <mental@rydia.net> | 2006-05-28 19:51:13 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-05-28 19:51:13 +0000 |
| commit | 2d08a9d98d19a0581eeae687bb0322dc98806d40 (patch) | |
| tree | 3adec19e80f170b623e41454aae370cb7c75dade /src/display/sp-canvas.cpp | |
| parent | okay, that looked better in the icon preview than it did in practice; putting... (diff) | |
| download | inkscape-2d08a9d98d19a0581eeae687bb0322dc98806d40.tar.gz inkscape-2d08a9d98d19a0581eeae687bb0322dc98806d40.zip | |
replace nr_new() with g_new(), and try to converge on using the glib allocator a little more instead of the others (aside from libgc)
(bzr r1044)
Diffstat (limited to 'src/display/sp-canvas.cpp')
| -rw-r--r-- | src/display/sp-canvas.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index edd429f0d..8ce4a35b4 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -994,7 +994,7 @@ shutdown_transients (SPCanvas *canvas) if (canvas->need_redraw) { canvas->need_redraw = FALSE; } - if ( canvas->tiles ) free(canvas->tiles); + if ( canvas->tiles ) g_free(canvas->tiles); canvas->tiles=NULL; canvas->tLeft=canvas->tTop=canvas->tRight=canvas->tBottom=0; canvas->tileH=canvas->tileV=0; @@ -2029,7 +2029,7 @@ inline int sp_canvas_tile_ceil(int x) void sp_canvas_resize_tiles(SPCanvas* canvas,int nl,int nt,int nr,int nb) { if ( nl >= nr || nt >= nb ) { - if ( canvas->tiles ) free(canvas->tiles); + if ( canvas->tiles ) g_free(canvas->tiles); canvas->tLeft=canvas->tTop=canvas->tRight=canvas->tBottom=0; canvas->tileH=canvas->tileV=0; canvas->tiles=NULL; @@ -2041,7 +2041,7 @@ void sp_canvas_resize_tiles(SPCanvas* canvas,int nl,int nt,int nr,int nb) int tb=sp_canvas_tile_ceil(nb); int nh=tr-tl,nv=tb-tt; - uint8_t* ntiles=(uint8_t*)malloc(nh*nv*sizeof(uint8_t)); + uint8_t* ntiles=(uint8_t*)g_malloc(nh*nv*sizeof(uint8_t)); for (int i=tl;i<tr;i++) { for (int j=tt;j<tb;j++) { int ind=(i-tl)+(j-tt)*nh; @@ -2052,7 +2052,7 @@ void sp_canvas_resize_tiles(SPCanvas* canvas,int nl,int nt,int nr,int nb) } } } - if ( canvas->tiles ) free(canvas->tiles); + if ( canvas->tiles ) g_free(canvas->tiles); canvas->tiles=ntiles; canvas->tLeft=tl; canvas->tTop=tt; |
