loplugin:unusedmethods unused return value in basic

Change-Id: I0ccbf994d2c9be35f43fc3c62e60da90634bacdf
This commit is contained in:
Noel Grandin 2016-01-11 08:39:01 +02:00
parent 1b26a4eb4b
commit bc80f951c1
6 changed files with 14 additions and 30 deletions

View File

@ -4754,9 +4754,9 @@ Any StructRefInfo::getValue()
return aRet; return aRet;
} }
bool StructRefInfo::setValue( const Any& rValue ) void StructRefInfo::setValue( const Any& rValue )
{ {
return uno_type_assignData( getInst(), uno_type_assignData( getInst(),
maType.getTypeLibType(), maType.getTypeLibType(),
const_cast<void*>(rValue.getValue()), const_cast<void*>(rValue.getValue()),
rValue.getValueTypeRef(), rValue.getValueTypeRef(),

View File

@ -151,17 +151,12 @@ void SbiBuffer::Chain( sal_uInt32 off )
} }
} }
bool SbiBuffer::operator +=( sal_Int8 n ) void SbiBuffer::operator +=( sal_Int8 n )
{ {
if( Check( 1 ) ) if( Check( 1 ) )
{ {
*pCur++ = (char) n; *pCur++ = (char) n;
nOff += 1; nOff += 1;
return true;
}
else
{
return false;
} }
} }
@ -179,18 +174,13 @@ bool SbiBuffer::operator +=( sal_uInt8 n )
} }
} }
bool SbiBuffer::operator +=( sal_Int16 n ) void SbiBuffer::operator +=( sal_Int16 n )
{ {
if( Check( 2 ) ) if( Check( 2 ) )
{ {
*pCur++ = (char) ( n & 0xFF ); *pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 ); *pCur++ = (char) ( n >> 8 );
nOff += 2; nOff += 2;
return true;
}
else
{
return false;
} }
} }
@ -224,13 +214,13 @@ bool SbiBuffer::operator +=( sal_uInt32 n )
} }
} }
bool SbiBuffer::operator +=( sal_Int32 n ) void SbiBuffer::operator +=( sal_Int32 n )
{ {
return operator +=( (sal_uInt32) n ); operator +=( (sal_uInt32) n );
} }
bool SbiBuffer::operator +=( const OUString& n ) void SbiBuffer::operator +=( const OUString& n )
{ {
sal_uInt32 len = n.getLength() + 1; sal_uInt32 len = n.getLength() + 1;
if( Check( len ) ) if( Check( len ) )
@ -239,11 +229,6 @@ bool SbiBuffer::operator +=( const OUString& n )
memcpy( pCur, aByteStr.getStr(), len ); memcpy( pCur, aByteStr.getStr(), len );
pCur += len; pCur += len;
nOff += len; nOff += len;
return true;
}
else
{
return false;
} }
} }

View File

@ -37,13 +37,13 @@ public:
~SbiBuffer(); ~SbiBuffer();
void Patch( sal_uInt32, sal_uInt32 ); void Patch( sal_uInt32, sal_uInt32 );
void Chain( sal_uInt32 ); void Chain( sal_uInt32 );
bool operator += (const OUString&); // save basic-string void operator += (const OUString&); // save basic-string
bool operator += (sal_Int8); // save character void operator += (sal_Int8); // save character
bool operator += (sal_Int16); // save integer void operator += (sal_Int16); // save integer
bool operator += (sal_uInt8); // save character bool operator += (sal_uInt8); // save character
bool operator += (sal_uInt16); // save integer bool operator += (sal_uInt16); // save integer
bool operator += (sal_uInt32); // save integer bool operator += (sal_uInt32); // save integer
bool operator += (sal_Int32); // save integer void operator += (sal_Int32); // save integer
char* GetBuffer(); // give out buffer (delete yourself!) char* GetBuffer(); // give out buffer (delete yourself!)
sal_uInt32 GetSize() { return nOff; } sal_uInt32 GetSize() { return nOff; }
}; };

View File

@ -59,7 +59,7 @@ public:
bool isEmpty() { return (mnPos == -1); } bool isEmpty() { return (mnPos == -1); }
css::uno::Any getValue(); css::uno::Any getValue();
bool setValue( const css::uno::Any& ); void setValue( const css::uno::Any& );
}; };
class SbUnoStructRefObject: public SbxObject class SbUnoStructRefObject: public SbxObject

View File

@ -349,7 +349,7 @@ bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; }
#endif #endif
bool SbxDecimal::getString( OUString& rString ) void SbxDecimal::getString( OUString& rString )
{ {
#ifdef WIN32 #ifdef WIN32
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
@ -390,7 +390,6 @@ bool SbxDecimal::getString( OUString& rString )
return bRet; return bRet;
#else #else
(void)rString; (void)rString;
return false;
#endif #endif
} }

View File

@ -90,7 +90,7 @@ public:
bool getULong( sal_uInt32& rVal ); bool getULong( sal_uInt32& rVal );
bool getSingle( float& rVal ); bool getSingle( float& rVal );
bool getDouble( double& rVal ); bool getDouble( double& rVal );
bool getString( OUString& rString ); void getString( OUString& rString );
bool operator -= ( const SbxDecimal &r ); bool operator -= ( const SbxDecimal &r );
bool operator += ( const SbxDecimal &r ); bool operator += ( const SbxDecimal &r );