summaryrefslogtreecommitdiff
path: root/idl/source/prj/parser.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-11 10:37:29 +0200
committerNoel Grandin <noel@peralex.com>2016-02-11 14:47:01 +0200
commit09d58f7be8802c7e3f60ced1b428195b4d6bb7fa (patch)
treedab8f13a6b49f54c1d16c97592d96c44b57f91f6 /idl/source/prj/parser.cxx
parent6e8be4c99e00d75bfb0d358f64071495ec6b21e3 (diff)
GetToken never returns null, so use a reference
Change-Id: I0164e546b0ee0b40acc7b9253d3c0ecded97280c
Diffstat (limited to 'idl/source/prj/parser.cxx')
-rw-r--r--idl/source/prj/parser.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx
index db594ab43bd0..7a48c6fe5a6c 100644
--- a/idl/source/prj/parser.cxx
+++ b/idl/source/prj/parser.cxx
@@ -28,17 +28,17 @@ bool SvIdlParser::ReadSvIdl( SvIdlDataBase& rBase, SvTokenStream & rInStm, bool
{
rBase.SetPath(rPath); // only valid for this iteration
bool bOk = true;
- SvToken * pTok = &rInStm.GetToken();
+ SvToken& rTok = rInStm.GetToken();
// only one import at the very beginning
- if( pTok->Is( SvHash_import() ) )
+ if( rTok.Is( SvHash_import() ) )
{
rInStm.GetToken_Next();
- pTok = rInStm.GetToken_Next();
- if( pTok && pTok->IsString() )
+ rTok = rInStm.GetToken_Next();
+ if( rTok.IsString() )
{
OUString aFullName;
if( osl::FileBase::E_None == osl::File::searchFileURL(
- OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US),
+ OStringToOUString(rTok.GetString(), RTL_TEXTENCODING_ASCII_US),
rPath,
aFullName) )
{
@@ -57,11 +57,11 @@ bool SvIdlParser::ReadSvIdl( SvIdlDataBase& rBase, SvTokenStream & rInStm, bool
while( bOk )
{
- pTok = &rInStm.GetToken();
- if( pTok->IsEof() )
+ rTok = rInStm.GetToken();
+ if( rTok.IsEof() )
return true;
- if( pTok->Is( SvHash_module() ) )
+ if( rTok.Is( SvHash_module() ) )
{
tools::SvRef<SvMetaModule> aModule = new SvMetaModule( bImported );
if( aModule->ReadSvIdl( rBase, rInStm ) )
@@ -72,7 +72,7 @@ bool SvIdlParser::ReadSvIdl( SvIdlDataBase& rBase, SvTokenStream & rInStm, bool
else
bOk = false;
}
- if( !bOk || !pTok->IsEof() )
+ if( !bOk || !rTok.IsEof() )
{
// error treatment
rBase.WriteError( rInStm );