Replaced a bunch of delete by delete[] where it's legitimate.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2011-02-02 18:39:34 +00:00
parent 40624df4a9
commit 8072ef8ce8
7 changed files with 8 additions and 8 deletions

View File

@ -85,7 +85,7 @@ void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx
uchar *img = fl_read_image(NULL, srcx, srcy, w, h, 0);
fl_end_offscreen();
fl_draw_image(img, x, y, w, h, 3, 0);
delete img;
delete[] img;
}
}
/** @} */

View File

@ -504,7 +504,7 @@ int Fl_Native_File_Chooser::post() {
p = r + 1;
} while(*p);
popup = createPopupAccessory((NSSavePanel*)_panel, t, "Enable:", 0);
delete t;
delete[] t;
[[popup menu] addItem:[NSMenuItem separatorItem]];
[popup addItemWithTitle:@"All Documents"];
[popup setAction:@selector(validateVisibleColumns)];

View File

@ -141,7 +141,7 @@ void Fl_Paged_Device::print_window_part(Fl_Window *win, int x, int y, int w, int
save_front->show();
current->set_current();
fl_draw_image(image_data, delta_x, delta_y, w, h, 3);
delete image_data;
delete[] image_data;
}
/**

View File

@ -1017,7 +1017,7 @@ static void transformed_draw_extra(const char* str, int n, double x, double y, i
fl_delete_offscreen(off);
// compute the mask of what is not the background
uchar *mask = calc_mask(img, w, h, bg_color);
delete img;
delete[] img;
// write the string image to PostScript as a scaled bitmask
fprintf(output, "%g %g %g %g %d %d MI\n", x, y - h*0.77/scale, w/scale, h/scale, w, h);
uchar *di;
@ -1032,7 +1032,7 @@ static void transformed_draw_extra(const char* str, int n, double x, double y, i
fprintf(output,"\n");
}
fprintf(output,">\n");
delete mask;
delete[] mask;
}
static int is_in_table(unsigned utf) {

View File

@ -3265,7 +3265,7 @@ unsigned char *Fl_X::bitmap_from_window_rect(Fl_Window *win, int x, int y, int w
static void imgProviderReleaseData (void *info, const void *data, size_t size)
{
delete (unsigned char *)data;
delete[] (unsigned char *)data;
}
CGImageRef Fl_X::CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, int h)

View File

@ -370,7 +370,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
CGImageRelease(img);
delete array;
delete[] array;
}
else {
#endif // __APPLE_QUARTZ__

View File

@ -72,7 +72,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
pdst[2] = psrc[2]; // B
}
}
if(fl_window != NULL) delete base;
if(fl_window != NULL) delete[] base;
return p;
}