On Mon, 2011-09-19 at 20:58 +0200, Thomas Arnhold wrote:
Hi,
I've recently seen some changes, which removed unnecessary NULL checks
for delete commands with the form:
- if (pTextPContext)
- delete pTextPContext;
+ delete pTextPContext;
Codebase is full with these. I've attached a little perl script which
should solve this conversion. I've attached a sample for the vcl dir.
Any objections?
Those extraneous if's annoy me alright, but a mass conversion would need
more cunning, e.g. extra stuff done inside the if, and else branches,
e.g. the sample patch has this catch...
- if ( mpDisplayDev )
- delete mpDisplayDev;
+ delete mpDisplayDev;
else
{
so end up with a bare else. I pushed the working bits in the mean time.
C.
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.