Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Muthu,

Its nice to see those patches. But, it will be nice to see/use the
tools/scripts directly? Especially if they can be hooked to git (like
the current white space/tabs removal ones)?

First I noticed, that ( () ) did only appear in two cases: SAL_THROW( () ) and THROWS( () )

As I wanted to be sure of that, I used the following command to filter lines, which contain SAL_THROW or THROWS:
$ git grep -I "( () )" | grep -v "SAL_THROW" | grep -v "THROWS"

The command didn't find anything else, so I assumed it is safe to replace ( () ) by (()) in all these cases. (I guess creating two patches - one for SAL_THROW and one for THROWS - would have been safer.)

To replace ( () ) by (()) I used the following command:
$ git grep -I -l "( () )" | while read line ; do sed -i -e "s/( () )/(())/g" "$line" ; done

@Alex: Forgot to mention one more thing: We follow (normally) space
after '(' and before ')' if there are parameters. Sometimes, we would be
tempted to remove the space in cases like foo( param1, param2 ); as well
;) ( I am always tempted in such cases :P )

Actually both variants SAL_THROW(()) & SAL_THROW( () ) and accordingly THROWS( () ) & THROWS(()) were found in the code base before the code cleanup. I have chosen the first one, because I discovered the use of ANSI, which was always written as ANSI(()) and never as ANSI( () ).

I personally prefer - in this case - the first one, but if you wish to use the second one, this is also no problem at all... (But I don't think using both variants - one over here and one over there - is a good idea.)

Best regards,
Alexander


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.