Author: manolo
Date: 2011-02-02 10:39:34 -0800 (Wed, 02 Feb 2011)
New Revision: 8362
Log:
Replaced a bunch of delete by delete[] where it's legitimate.
Modified:
branches/branch-1.3/src/Fl_Double_Window.cxx
branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm
branches/branch-1.3/src/Fl_Paged_Device.cxx
branches/branch-1.3/src/Fl_PostScript.cxx
branches/branch-1.3/src/Fl_cocoa.mm
branches/branch-1.3/src/fl_draw_pixmap.cxx
branches/branch-1.3/src/fl_read_image_mac.cxx
Modified: branches/branch-1.3/src/Fl_Double_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Double_Window.cxx 2011-02-02 17:53:14 UTC
(rev 8361)
+++ branches/branch-1.3/src/Fl_Double_Window.cxx 2011-02-02 18:39:34 UTC
(rev 8362)
@@ -85,7 +85,7 @@
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;
}
}
/** @} */
Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm
===================================================================
--- branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm 2011-02-02
17:53:14 UTC (rev 8361)
+++ branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm 2011-02-02
18:39:34 UTC (rev 8362)
@@ -504,7 +504,7 @@
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)];
Modified: branches/branch-1.3/src/Fl_Paged_Device.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Paged_Device.cxx 2011-02-02 17:53:14 UTC (rev
8361)
+++ branches/branch-1.3/src/Fl_Paged_Device.cxx 2011-02-02 18:39:34 UTC (rev
8362)
@@ -141,7 +141,7 @@
save_front->show();
current->set_current();
fl_draw_image(image_data, delta_x, delta_y, w, h, 3);
- delete image_data;
+ delete[] image_data;
}
/**
Modified: branches/branch-1.3/src/Fl_PostScript.cxx
===================================================================
--- branches/branch-1.3/src/Fl_PostScript.cxx 2011-02-02 17:53:14 UTC (rev
8361)
+++ branches/branch-1.3/src/Fl_PostScript.cxx 2011-02-02 18:39:34 UTC (rev
8362)
@@ -1017,7 +1017,7 @@
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 @@
fprintf(output,"\n");
}
fprintf(output,">\n");
- delete mask;
+ delete[] mask;
}
static int is_in_table(unsigned utf) {
Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-02-02 17:53:14 UTC (rev 8361)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-02-02 18:39:34 UTC (rev 8362)
@@ -3265,7 +3265,7 @@
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)
Modified: branches/branch-1.3/src/fl_draw_pixmap.cxx
===================================================================
--- branches/branch-1.3/src/fl_draw_pixmap.cxx 2011-02-02 17:53:14 UTC (rev
8361)
+++ branches/branch-1.3/src/fl_draw_pixmap.cxx 2011-02-02 18:39:34 UTC (rev
8362)
@@ -370,7 +370,7 @@
CGContextDrawImage(fl_gc, rect, img);
Fl_X::q_end_image();
CGImageRelease(img);
- delete array;
+ delete[] array;
}
else {
#endif // __APPLE_QUARTZ__
Modified: branches/branch-1.3/src/fl_read_image_mac.cxx
===================================================================
--- branches/branch-1.3/src/fl_read_image_mac.cxx 2011-02-02 17:53:14 UTC
(rev 8361)
+++ branches/branch-1.3/src/fl_read_image_mac.cxx 2011-02-02 18:39:34 UTC
(rev 8362)
@@ -72,7 +72,7 @@
pdst[2] = psrc[2]; // B
}
}
- if(fl_window != NULL) delete base;
+ if(fl_window != NULL) delete[] base;
return p;
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit