On 08/29/2012 09:06 PM, Libreoffice Gerrit user wrote:
commit ecfa813595cb577781668219d9e17a0494f92bea
Author: Zolnai Tamás <zolnaitamas2000@gmail.com>
Date: Wed Aug 29 12:58:29 2012 +0200
Some cleanup
Use normal integer types when it's unecessary to use
sal_int types.
Delete some hack from code.
Change-Id: I93f0b1f260578d3aa9609b7e9d8a79053693971b
Reviewed-on: https://gerrit.libreoffice.org/510
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
[...]
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index c488c87..472e876 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -59,10 +59,10 @@ OString ImplEscapeText(const OString& rText,
{
if(rEscaped.getLength()!=2*rUnEscaped.getLength()) throw;
OString sResult = rText;
- sal_Int32 nCount = 0;
- for(sal_Int32 nIndex=0; nIndex<rText.getLength(); ++nIndex)
+ int nCount = 0;
+ for(int nIndex=0; nIndex<rText.getLength(); ++nIndex)
{
- 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.
Stephan
Context
- Re: [Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source · Stephan Bergmann
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.