From be8c414567f49242164b1fdfb12764b16be355c1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 19 Jan 2018 09:13:03 +0200 Subject: loplugin:unusedmethods also check for functions returning bool we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins Reviewed-by: Noel Grandin --- idl/inc/bastype.hxx | 2 +- idl/inc/lex.hxx | 4 +--- idl/inc/parser.hxx | 2 +- idl/source/objects/bastype.cxx | 5 ++--- idl/source/prj/parser.cxx | 7 +++---- 5 files changed, 8 insertions(+), 12 deletions(-) (limited to 'idl') diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index de659276472a..1c0d93765e2e 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -56,7 +56,7 @@ public: void setString(const OString& rStr) { m_aStr = rStr; } const OString& getString() const { return m_aStr; } - bool ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm ); + void ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm ); bool IsSet() const { return !m_aStr.isEmpty() || nValue != 0; diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 1da4c2f97ea8..58728260772c 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -187,16 +187,14 @@ public: return false; } - bool ReadIfDelimiter() + void ReadIfDelimiter() { if( GetToken().IsChar() && (';' == GetToken().GetChar() || ',' == GetToken().GetChar()) ) { GetToken_Next(); - return true; } - return false; } sal_uInt32 Tell() const { return pCurToken-aTokList.begin(); } diff --git a/idl/inc/parser.hxx b/idl/inc/parser.hxx index cdd1e30a10f7..ae9db7105bd9 100644 --- a/idl/inc/parser.hxx +++ b/idl/inc/parser.hxx @@ -57,7 +57,7 @@ public: SvMetaType* ReadKnownType(); void Read(char cChar); bool ReadIfBoolAttribute( SvBOOL&, SvStringHashEntry const * pName); - bool ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry const * pName ); + void ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry const * pName ); bool ReadIf(char cChar); void ReadDelimiter(); bool ReadIfDelimiter(); diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 5a34b1c381ea..0dddd98d5323 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -49,7 +49,7 @@ bool SvBOOL::ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm return false; } -bool SvIdentifier::ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm ) +void SvIdentifier::ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm ) { sal_uInt32 nTokPos = rInStm.Tell(); SvToken& rTok = rInStm.GetToken_Next(); @@ -70,10 +70,9 @@ bool SvIdentifier::ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & r bOk = rInStm.ReadIf( ')' ); } if( bOk ) - return true; + return; } rInStm.Seek( nTokPos ); - return false; } void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase, diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index 5701f4f93cd0..c6fa85431f0e 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -499,7 +499,7 @@ bool SvIdlParser::ReadIfBoolAttribute( SvBOOL& rBool, SvStringHashEntry const * return false; } -bool SvIdlParser::ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry const * pName ) +void SvIdlParser::ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry const * pName ) { sal_uInt32 nTokPos = rInStm.Tell(); SvToken& rTok = rInStm.GetToken_Next(); @@ -514,10 +514,9 @@ bool SvIdlParser::ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntr rIdentifier.setString(rTok.GetString()); rInStm.GetToken_Next(); } - return true; } - rInStm.Seek( nTokPos ); - return false; + else + rInStm.Seek( nTokPos ); } void SvIdlParser::ReadDelimiter() -- cgit