diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-23 08:18:13 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-23 10:07:09 +0200 |
commit | 1e6dfe458079620a7192381dce9505e94a83518a (patch) | |
tree | a2786a95233ca76acc2a44104050309ebda712aa /idl | |
parent | 20276795b7a3b968fca873f29bbb971afc9fc0a8 (diff) |
cid#1353438 Logically dead code
Change-Id: Ib444a1941e2bec03394c4e8eb7a5a34adbe3f4f6
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/parser.hxx | 2 | ||||
-rw-r--r-- | idl/source/prj/parser.cxx | 14 |
2 files changed, 5 insertions, 11 deletions
diff --git a/idl/inc/parser.hxx b/idl/inc/parser.hxx index fd1a3526a1a2..c24fdfb9f1b1 100644 --- a/idl/inc/parser.hxx +++ b/idl/inc/parser.hxx @@ -45,7 +45,7 @@ public: void ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMetaTypeType ); void ReadInterfaceOrShellEntry( SvMetaClass& rClass ); bool ReadInterfaceOrShellSlot( SvMetaSlot& rSlot ); - bool ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr ); + void ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr ); void ReadItem(); void ReadStruct(); void ReadEnum(); diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index b8899313c586..f9e2f0f8c53e 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -323,7 +323,8 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass) else { xAttr = new SvMetaAttribute( pType ); - bOk = ReadInterfaceOrShellMethodOrAttribute(*xAttr); + ReadInterfaceOrShellMethodOrAttribute(*xAttr); + bOk = true; } if( bOk ) bOk = xAttr->Test( rInStm ); @@ -387,10 +388,8 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot) return bOk; } -bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr ) +void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr ) { - sal_uInt32 nTokPos = rInStm.Tell(); - bool bOk = false; rAttr.SetName( ReadIdentifier() ); rAttr.aSlotId.setString( ReadIdentifier() ); sal_uLong n; @@ -398,7 +397,6 @@ bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr throw SvParseException( rInStm, "no value for identifier <" + rAttr.aSlotId.getString() + "> " ); rAttr.aSlotId.SetValue(n); - bOk = true; if( ReadIf( '(' ) ) { // read method arguments @@ -420,14 +418,10 @@ bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr Read( ')' ); rAttr.aType->SetType( MetaTypeType::Method ); } - if( bOk && ReadIf( '[' ) ) + if( ReadIf( '[' ) ) { Read( ']' ); } - - if( !bOk ) - rInStm.Seek( nTokPos ); - return bOk; } SvMetaClass * SvIdlParser::ReadKnownClass() |