[Libreoffice] Remove NULL checks from delete

Thomas Arnhold thomas at arnhold.org
Mon Sep 19 11:58:57 PDT 2011


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?

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replaceDelete.pl
Type: text/x-perl
Size: 720 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110919/8ad52f56/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-example.patch
Type: text/x-patch
Size: 9614 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110919/8ad52f56/attachment.bin>


More information about the LibreOffice mailing list