[Libreoffice] [PATCH] Replaced deprecated types in funcdesc

Tor Lillqvist tlillqvist at novell.com
Tue Jan 18 01:19:55 PST 2011


In general the patch looks mostly good. I wouldn't mind a second opinion from Kohei, though, in case there is something calc-specific I haven't thought of.

Some comments, though:

1) You also change the spacing style to have just one space separation. I didn't check if you do it consistently in every case, but anyway, I think you should separate the patch into two: One that does semantic changes (changes types) and another one that makes spacing and indentation consistent with surrounding code.

2) You initialise OUString variables as ::rtl::OUString aDefArgNameValue = ::rtl::OUString::createFromAscii("value"). The recommended way is  ::rtl::OUString aDefArgNameValue( RTL_CONSTASCII_USTRINGPARAM("value"))

3) There really is no reason to use explicit 16-bit loop counters in general in for loops in cases where for the code inside the loop it doesn't matter what integral type the loop counter is (and there is no intentional overflow of it (lol)).

Just use int instead and let the compiler choose the most efficient way to compile it. So instead of changing

    for (USHORT i =0; i < LIMIT; i++)
        foo(array[i]);

to

    for (sal_uInt16 i =0; i < LIMIT; i++)
        foo(array[i]);

just change it to

    for (int i =0; i < LIMIT; i++)
        foo(array[i]);

Thanks,
--tml




More information about the LibreOffice mailing list