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


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



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.