[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source

Miklos Vajna vmiklos at suse.cz
Thu Aug 30 03:21:00 PDT 2012


On Thu, Aug 30, 2012 at 11:42:40AM +0200, Stephan Bergmann <sbergman at 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


More information about the LibreOffice mailing list