summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-25 17:56:24 +0200
committerNoel Grandin <noel@peralex.com>2014-09-26 15:26:48 +0200
commit5501c8d2220ee3cab703d09d348e99ba3e017dba (patch)
treece59b08fa7ad1192f3038266db1be0d64a05c0c3 /basic
parentdedfa972bc19f21e6fab7c38a64ae9543142f416 (diff)
remove unnecessary casts in calls to SvStream.WriteUInt16
left over from our conversion of the SvStream output operators to more specific methods Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--basic/source/runtime/methods1.cxx14
-rw-r--r--basic/source/sbx/sbxarray.cxx4
-rw-r--r--basic/source/sbx/sbxbase.cxx10
4 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 04303b3b2317..eed53e7c902a 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1938,7 +1938,7 @@ bool StarBASIC::StoreData( SvStream& r ) const
{
return false;
}
- r.WriteUInt16( (sal_uInt16) pModules->Count() );
+ r.WriteUInt16( pModules->Count() );
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
{
SbModule* p = (SbModule*) pModules->Get( i );
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 8a8c9eae881c..93abf27af3be 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -995,7 +995,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxBYTE:
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)SbxBYTE ); // VarType Id
+ pStrm->WriteUInt16( SbxBYTE ); // VarType Id
}
pStrm->WriteUChar( rVar.GetByte() );
break;
@@ -1009,7 +1009,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxUINT:
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)SbxINTEGER ); // VarType Id
+ pStrm->WriteUInt16( SbxINTEGER ); // VarType Id
}
pStrm->WriteInt16( rVar.GetInteger() );
break;
@@ -1018,7 +1018,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxULONG:
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)SbxLONG ); // VarType Id
+ pStrm->WriteUInt16( SbxLONG ); // VarType Id
}
pStrm->WriteInt32( rVar.GetLong() );
break;
@@ -1026,14 +1026,14 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxSALUINT64:
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)SbxSALINT64 ); // VarType Id
+ pStrm->WriteUInt16( SbxSALINT64 ); // VarType Id
}
pStrm->WriteUInt64( (sal_uInt64)rVar.GetInt64() );
break;
case SbxSINGLE:
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)eType ); // VarType Id
+ pStrm->WriteUInt16( eType ); // VarType Id
}
pStrm->WriteFloat( rVar.GetSingle() );
break;
@@ -1043,7 +1043,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxDATE:
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)eType ); // VarType Id
+ pStrm->WriteUInt16( eType ); // VarType Id
}
pStrm->WriteDouble( rVar.GetDouble() );
break;
@@ -1056,7 +1056,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
{
if( bIsVariant )
{
- pStrm->WriteUInt16( (sal_uInt16)SbxSTRING );
+ pStrm->WriteUInt16( SbxSTRING );
}
pStrm->WriteUniOrByteString( rStr, osl_getThreadTextEncoding() );
}
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 55cd00beaebe..921745e244da 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -534,13 +534,13 @@ bool SbxArray::StoreData( SvStream& rStrm ) const
if (pEntry->mpVar && (pEntry->mpVar->GetFlags() & SBX_DONTSTORE) == SBX_NONE)
nElem++;
}
- rStrm.WriteUInt16( (sal_uInt16) nElem );
+ rStrm.WriteUInt16( nElem );
for( n = 0; n < mpVarEntries->size(); n++ )
{
SbxVarEntry* pEntry = (*mpVarEntries)[n];
if (pEntry->mpVar && (pEntry->mpVar->GetFlags() & SBX_DONTSTORE) == SBX_NONE)
{
- rStrm.WriteUInt16( (sal_uInt16) n );
+ rStrm.WriteUInt16( n );
if (!pEntry->mpVar->Store(rStrm))
return false;
}
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 6dfaa383441b..7ec9c00edf9a 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -260,9 +260,9 @@ bool SbxBase::Store( SvStream& rStrm )
if( ( nFlags & SBX_DONTSTORE ) == SBX_NONE )
{
rStrm.WriteUInt32( (sal_uInt32) GetCreator() )
- .WriteUInt16( (sal_uInt16) GetSbxId() )
- .WriteUInt16( (sal_uInt16) GetFlags() )
- .WriteUInt16( (sal_uInt16) GetVersion() );
+ .WriteUInt16( GetSbxId() )
+ .WriteUInt16( GetFlags() )
+ .WriteUInt16( GetVersion() );
sal_Size nOldPos = rStrm.Tell();
rStrm.WriteUInt32( (sal_uInt32) 0L );
bool bRes = StoreData( rStrm );
@@ -381,8 +381,8 @@ bool SbxInfo::StoreData( SvStream& rStrm ) const
{
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, i->aName,
RTL_TEXTENCODING_ASCII_US);
- rStrm.WriteUInt16( (sal_uInt16) i->eType )
- .WriteUInt16( (sal_uInt16) i->nFlags )
+ rStrm.WriteUInt16( i->eType )
+ .WriteUInt16( i->nFlags )
.WriteUInt32( (sal_uInt32) i->nUserData );
}
return true;