Re: [Libreoffice] Remove NULL checks from delete

2011-09-19 Thread Thomas Arnhold
Hi Stephan, thanks for adjusting the regex. false positives like if (foo) delete bar wouldn't occur within my regex (the inner one). But this is some kind of hidden (the $1). I did this some kind of obfuscated, because I didn't remembered \1 for lookaheads ;) I you want to, run it :) On 09/

Re: [Libreoffice] Remove NULL checks from delete

2011-09-19 Thread Stephan Bergmann
On 09/19/2011 08:58 PM, Thomas Arnhold wrote: 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 shou

[Libreoffice] Remove NULL checks from delete

2011-09-19 Thread Thomas Arnhold
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.