loplugin:unusedmethods unused return value in idl

Change-Id: I790fea8b88ca99d17de14f1e91081671422dd8db
This commit is contained in:
Noel Grandin
2016-01-11 13:31:24 +02:00
parent 0980a6207d
commit ea5b48e9da
7 changed files with 14 additions and 26 deletions

View File

@@ -128,7 +128,7 @@ public:
void Push( SvMetaObject * pObj )
{ aList.push_back( pObj ); }
SvMetaObject * Pop() { return aList.pop_back(); }
void Pop() { aList.pop_back(); }
SvMetaObject * Get( std::function<bool ( const SvMetaObject* )> isSvMetaObject )
{
for( SvMetaObjectMemberList::reverse_iterator it = aList.rbegin(); it != aList.rend(); ++it )
@@ -200,7 +200,7 @@ public:
SvMetaModule * GetModule() const;
const SvGlobalName &GetUUId() const;
void GetUUId() const;
void SetModule( SvIdlDataBase & rBase );
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;

View File

@@ -79,8 +79,8 @@ public:
sal_uInt32 GetValue() const { return nValue; }
void SetValue( sal_uInt32 nVal ) { nValue = nVal; }
bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
bool ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
void ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
void ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
SvTokenStream & rInStm );
};
@@ -112,7 +112,7 @@ class SvHelpText : public SvString
{
public:
SvHelpText() {}
bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
void ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
};
@@ -139,10 +139,6 @@ public:
return (r.nMajorVersion == nMajorVersion)
&& (r.nMinorVersion == nMinorVersion);
}
bool operator != ( const SvVersion & r )
{
return !(*this == r);
}
bool ReadSvIdl( SvTokenStream & rInStm );
};

View File

@@ -126,7 +126,7 @@ public:
SvMetaAttribute * SearchKnownAttr( const SvIdentifier& );
SvMetaClass * ReadKnownClass( SvTokenStream & rInStm );
void AddDepFile(OUString const& rFileName);
bool WriteDepFile(SvFileStream & rStream, OUString const& rTarget);
void WriteDepFile(SvFileStream & rStream, OUString const& rTarget);
};
class SvIdlWorkingBase : public SvIdlDataBase

View File

@@ -79,8 +79,6 @@ public:
bool operator == ( const SvStringHashEntry & rRef )
{ return nHashId == rRef.nHashId; }
bool operator != ( const SvStringHashEntry & rRef )
{ return ! operator == ( rRef ); }
SvStringHashEntry & operator = ( const SvStringHashEntry & rRef )
{ SvRefBase::operator=( rRef );
aName = rRef.aName;
@@ -110,8 +108,6 @@ public:
bool Insert( const OString& rStr, sal_uInt32 * pHash ); // insert string
bool Test( const OString& rStr, sal_uInt32 * pHash ) const; // test of insert string
SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string
SvStringHashEntry & operator []( sal_uInt32 nPos ) const
{ return pEntries[ nPos ]; }
};
#endif // INCLUDED_IDL_INC_HASH_HXX

View File

@@ -176,11 +176,10 @@ SvMetaModule * SvMetaExtern::GetModule() const
return pModule;
}
const SvGlobalName & SvMetaExtern::GetUUId() const
void SvMetaExtern::GetUUId() const
{
if( aUUId == SvGlobalName() )
GetModule()->FillNextName( &const_cast<SvMetaExtern *>(this)->aUUId );
return aUUId;
}
void SvMetaExtern::SetModule( SvIdlDataBase & rBase )

View File

@@ -115,7 +115,7 @@ bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm
return false;
}
bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
SvStringHashEntry * pName,
SvTokenStream & rInStm )
{
@@ -125,7 +125,7 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
if( rBase.FindId( getString(), &n ) )
{
nValue = n;
return true;
return;
}
else
{
@@ -135,10 +135,9 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
rBase.WriteError( rInStm );
}
}
return false;
}
bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
@@ -151,7 +150,7 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
{
setString(pTok->GetString());
nValue = n;
return true;
return;
}
else
{
@@ -162,7 +161,6 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
}
}
rInStm.Seek( nTokPos );
return false;
}
bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
@@ -192,9 +190,9 @@ bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
return false;
}
bool SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
void SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
{
return SvString::ReadSvIdl( SvHash_HelpText(), rInStm );
SvString::ReadSvIdl( SvHash_HelpText(), rInStm );
}
bool SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )

View File

@@ -674,7 +674,7 @@ struct WriteDummy
}
};
bool SvIdlDataBase::WriteDepFile(
void SvIdlDataBase::WriteDepFile(
SvFileStream & rStream, OUString const& rTarget)
{
rStream.WriteCharPtr( OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr() );
@@ -682,7 +682,6 @@ bool SvIdlDataBase::WriteDepFile(
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream));
rStream.WriteCharPtr( "\n\n" );
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDummy(rStream));
return rStream.GetError() == SVSTREAM_OK;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */