summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-07-14 22:45:40 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-07-19 17:12:30 +0200
commit903baa666b64e0576f35242970f3abe80723fbc1 (patch)
treeb903ec9c23510e2dc1ff2cc0d16b029e182f6f91 /basic
parentc3a06bcac6536ccfcc49949492c98bfd82c68b52 (diff)
Use more proper integer types
Change-Id: If86163ddeff91571419a37becbbe75f98e681d7d
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/methods.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 15f8bfe43715..17857904cdf6 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2050,7 +2050,7 @@ RTLFUNC(CDateFromIso)
if ( rPar.Count() == 2 )
{
OUString aStr = rPar.Get(1)->GetOUString();
- sal_Int16 iMonthStart = aStr.getLength() - 4;
+ const sal_Int32 iMonthStart = aStr.getLength() - 4;
OUString aYearStr = aStr.copy( 0, iMonthStart );
OUString aMonthStr = aStr.copy( iMonthStart, 2 );
OUString aDayStr = aStr.copy( iMonthStart+2, 2 );
@@ -3836,9 +3836,9 @@ OUString getBasicTypeName( SbxDataType eType )
"Decimal", // SbxDECIMAL
};
- int nPos = ((int)eType) & 0x0FFF;
- sal_uInt16 nTypeNameCount = sizeof( pTypeNames ) / sizeof( char* );
- if ( nPos < 0 || nPos >= nTypeNameCount )
+ size_t nPos = static_cast<size_t>(eType) & 0x0FFF;
+ const size_t nTypeNameCount = SAL_N_ELEMENTS( pTypeNames );
+ if ( nPos >= nTypeNameCount )
{
nPos = nTypeNameCount - 1;
}
@@ -3989,7 +3989,7 @@ RTLFUNC(DDEInitiate)
}
else
{
- rPar.Get(0)->PutInteger( (int)nChannel );
+ rPar.Get(0)->PutInteger( static_cast<sal_Int16>(nChannel) );
}
}