summaryrefslogtreecommitdiff
path: root/basic/source/comp/buffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/comp/buffer.cxx')
-rw-r--r--basic/source/comp/buffer.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index c863d92085bf..7b8feaa36165 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -109,10 +109,10 @@ void SbiBuffer::Patch( sal_uInt32 off, sal_uInt32 val )
sal_uInt16 val1 = static_cast<sal_uInt16>( val & 0xFFFF );
sal_uInt16 val2 = static_cast<sal_uInt16>( val >> 16 );
sal_uInt8* p = reinterpret_cast<sal_uInt8*>(pBuf.get()) + off;
- *p++ = (char) ( val1 & 0xFF );
- *p++ = (char) ( val1 >> 8 );
- *p++ = (char) ( val2 & 0xFF );
- *p = (char) ( val2 >> 8 );
+ *p++ = static_cast<char>( val1 & 0xFF );
+ *p++ = static_cast<char>( val1 >> 8 );
+ *p++ = static_cast<char>( val2 & 0xFF );
+ *p = static_cast<char>( val2 >> 8 );
}
}
@@ -139,10 +139,10 @@ void SbiBuffer::Chain( sal_uInt32 off )
pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "BACKCHAIN" );
break;
}
- *ip++ = (char) ( val1 & 0xFF );
- *ip++ = (char) ( val1 >> 8 );
- *ip++ = (char) ( val2 & 0xFF );
- *ip = (char) ( val2 >> 8 );
+ *ip++ = static_cast<char>( val1 & 0xFF );
+ *ip++ = static_cast<char>( val1 >> 8 );
+ *ip++ = static_cast<char>( val2 & 0xFF );
+ *ip = static_cast<char>( val2 >> 8 );
} while( i );
}
}
@@ -151,7 +151,7 @@ void SbiBuffer::operator +=( sal_Int8 n )
{
if( Check( 1 ) )
{
- *pCur++ = (char) n;
+ *pCur++ = static_cast<char>(n);
nOff += 1;
}
}
@@ -160,7 +160,7 @@ bool SbiBuffer::operator +=( sal_uInt8 n )
{
if( Check( 1 ) )
{
- *pCur++ = (char) n;
+ *pCur++ = static_cast<char>(n);
nOff += 1;
return true;
}
@@ -174,8 +174,8 @@ void SbiBuffer::operator +=( sal_Int16 n )
{
if( Check( 2 ) )
{
- *pCur++ = (char) ( n & 0xFF );
- *pCur++ = (char) ( n >> 8 );
+ *pCur++ = static_cast<char>( n & 0xFF );
+ *pCur++ = static_cast<char>( n >> 8 );
nOff += 2;
}
}
@@ -184,8 +184,8 @@ bool SbiBuffer::operator +=( sal_uInt16 n )
{
if( Check( 2 ) )
{
- *pCur++ = (char) ( n & 0xFF );
- *pCur++ = (char) ( n >> 8 );
+ *pCur++ = static_cast<char>( n & 0xFF );
+ *pCur++ = static_cast<char>( n >> 8 );
nOff += 2;
return true;
}
@@ -212,7 +212,7 @@ bool SbiBuffer::operator +=( sal_uInt32 n )
void SbiBuffer::operator +=( sal_Int32 n )
{
- operator +=( (sal_uInt32) n );
+ operator +=( static_cast<sal_uInt32>(n) );
}