summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 09:13:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 13:26:27 +0100
commitbe8c414567f49242164b1fdfb12764b16be355c1 (patch)
treec1f505272ec27e5e069f5d6964dc4f7b20150a5a /idl
parentbe94207ecb88a9005ee6624e354d70c9613d7653 (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/bastype.hxx2
-rw-r--r--idl/inc/lex.hxx4
-rw-r--r--idl/inc/parser.hxx2
-rw-r--r--idl/source/objects/bastype.cxx5
-rw-r--r--idl/source/prj/parser.cxx7
5 files changed, 8 insertions, 12 deletions
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()