From 903baa666b64e0576f35242970f3abe80723fbc1 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Tue, 14 Jul 2015 22:45:40 +0200 Subject: Use more proper integer types Change-Id: If86163ddeff91571419a37becbbe75f98e681d7d --- basic/source/runtime/methods.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'basic') 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(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(nChannel) ); } } -- cgit v1.2.3