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


On Thu, Aug 30, 2012 at 11:42:40AM +0200, Stephan Bergmann <sbergman@redhat.com> wrote:
-        sal_Int32 nActChar = rUnEscaped.indexOf(rText[nIndex]);
+        int nActChar = rUnEscaped.indexOf(rText[nIndex]);
         if(nActChar!=-1)
             sResult = sResult.replaceAt((nIndex)+(nCount++),1,
                                         rEscaped.copy(2*nActChar,2));

What's the reason for changes like this?  The involved type is
sal_Int32, not int, and sal_Int32 is not necessarily a typedef for
int (e.g., it is a typedef for long on some platforms).  I fear that
routinely using plain int instead of those sal types when
interfacing with code using those sal types leads to unnecessary
compiler warnings.

It was me who suggested using int and not sal_Int* when the size does
not matter. However I forgot to point out that sal_Int* types are the
way to go when the variable is initialized by a method returning
sal_Int* already.

Sorry for the confusion. :)

Miklos

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.