summaryrefslogtreecommitdiff
path: root/idl
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
parent6e8be4c99e00d75bfb0d358f64071495ec6b21e3 (diff)
GetToken never returns null, so use a reference
Change-Id: I0164e546b0ee0b40acc7b9253d3c0ecded97280c
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/lex.hxx10
-rw-r--r--idl/source/objects/basobj.cxx6
-rw-r--r--idl/source/objects/bastype.cxx38
-rw-r--r--idl/source/objects/module.cxx14
-rw-r--r--idl/source/objects/object.cxx10
-rw-r--r--idl/source/objects/slot.cxx4
-rw-r--r--idl/source/objects/types.cxx15
-rw-r--r--idl/source/prj/database.cxx138
-rw-r--r--idl/source/prj/parser.cxx18
9 files changed, 124 insertions, 129 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index 14b91cd893e6..e2e5bc374a87 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -156,7 +156,7 @@ public:
const OUString & GetFileName() const { return aFileName; }
SvStream & GetStream() { return rInStream; }
- SvToken* GetToken_PrevAll()
+ SvToken& GetToken_PrevAll()
{
std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken;
@@ -164,10 +164,10 @@ public:
if(pCurToken != aTokList.begin())
--pCurToken;
- return (*pRetToken).get();
+ return *(*pRetToken).get();
}
- SvToken* GetToken_NextAll()
+ SvToken& GetToken_NextAll()
{
std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken++;
@@ -176,10 +176,10 @@ public:
SetMax();
- return (*pRetToken).get();
+ return *(*pRetToken).get();
}
- SvToken* GetToken_Next()
+ SvToken& GetToken_Next()
{
// comments get removed initially
return GetToken_NextAll();
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 5812626174fa..797b84926664 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -74,12 +74,12 @@ void SvMetaObject::SetName( const OString& rName )
bool SvMetaObject::ReadNameSvIdl( SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
// read module name
- if( pTok->IsIdentifier() )
+ if( rTok.IsIdentifier() )
{
- SetName( pTok->GetString() );
+ SetName( rTok.GetString() );
return true;
}
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 26877f853f9d..ce1d8f379c66 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -31,18 +31,18 @@
bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->Is( pName ) )
+ if( rTok.Is( pName ) )
{
bool bOk = true;
bool bBracket = rInStm.Read( '(' );
if( bBracket || rInStm.Read( '=' ) )
{
- pTok = &rInStm.GetToken();
- if( pTok->IsBool() )
+ rTok = rInStm.GetToken();
+ if( rTok.IsBool() )
{
- *this = pTok->GetBool();
+ *this = rTok.GetBool();
rInStm.GetToken_Next();
}
@@ -61,18 +61,18 @@ bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->Is( pName ) )
+ if( rTok.Is( pName ) )
{
bool bOk = true;
bool bBracket = rInStm.Read( '(' );
if( bBracket || rInStm.Read( '=' ) )
{
- pTok = &rInStm.GetToken();
- if( pTok->IsIdentifier() )
+ rTok = rInStm.GetToken();
+ if( rTok.IsIdentifier() )
{
- setString(pTok->GetString());
+ setString(rTok.GetString());
rInStm.GetToken_Next();
}
if( bOk && bBracket )
@@ -89,14 +89,14 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->IsIdentifier() )
+ if( rTok.IsIdentifier() )
{
sal_uLong n;
- if( rBase.FindId( pTok->GetString(), &n ) )
+ if( rBase.FindId( rTok.GetString(), &n ) )
{
- setString(pTok->GetString());
+ setString(rTok.GetString());
nValue = n;
return;
}
@@ -111,18 +111,18 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
bool ReadStringSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, OString& aRetString )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->Is( pName ) )
+ if( rTok.Is( pName ) )
{
bool bOk = true;
bool bBracket = rInStm.Read( '(' );
if( bBracket || rInStm.Read( '=' ) )
{
- pTok = &rInStm.GetToken();
- if( pTok->IsString() )
+ rTok = rInStm.GetToken();
+ if( rTok.IsString() )
{
- aRetString = pTok->GetString();
+ aRetString = rTok.GetString();
rInStm.GetToken_Next();
}
if( bOk && bBracket )
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index ea040f57756b..29ce9721cbbe 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -90,10 +90,10 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
{
bool bOk = false;
rInStm.GetToken_Next();
- SvToken * pTok = rInStm.GetToken_Next();
- if( pTok->IsString() )
+ SvToken& rTok = rInStm.GetToken_Next();
+ if( rTok.IsString() )
{
- OUString aFullName(OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US));
+ OUString aFullName(OStringToOUString(rTok.GetString(), RTL_TEXTENCODING_ASCII_US));
rBase.StartNewFile( aFullName );
osl::FileBase::RC searchError = osl::File::searchFileURL(aFullName, rBase.GetPath(), aFullName);
osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName );
@@ -129,14 +129,14 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
{
OStringBuffer aStr("cannot open file: ");
aStr.append(OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8));
- rBase.SetError(aStr.makeStringAndClear(), *pTok);
+ rBase.SetError(aStr.makeStringAndClear(), rTok);
}
}
else
{
OStringBuffer aStr("cannot find file:");
aStr.append(OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8));
- rBase.SetError(aStr.makeStringAndClear(), *pTok);
+ rBase.SetError(aStr.makeStringAndClear(), rTok);
}
}
if( !bOk )
@@ -162,8 +162,8 @@ bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
bIsModified = true; // up to now always when compiler running
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
- bool bOk = pTok->Is( SvHash_module() );
+ SvToken& rTok = rInStm.GetToken_Next();
+ bool bOk = rTok.Is( SvHash_module() );
rInStm.ReadDelimiter();
if( bOk )
{
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 38cfe6bc59fa..697fe9f291b2 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -43,9 +43,9 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->Is( SvHash_import() ) )
+ if( rTok.Is( SvHash_import() ) )
{
SvMetaClass * pClass = rBase.ReadKnownClass( rInStm );
if( pClass )
@@ -54,10 +54,10 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
xEle.SetClass( pClass );
aClassElementList.push_back( xEle );
- pTok = &rInStm.GetToken();
- if( pTok->IsString() )
+ rTok = rInStm.GetToken();
+ if( rTok.IsString() )
{
- xEle.SetPrefix( pTok->GetString() );
+ xEle.SetPrefix( rTok.GetString() );
rInStm.GetToken_Next();
}
return;
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 6cdeea7a69c0..72463693f21b 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -280,8 +280,8 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
if( !aSlotType.Is() )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
- if( pTok->Is( SvHash_SlotType() ) )
+ SvToken& rTok = rInStm.GetToken_Next();
+ if( rTok.Is( SvHash_SlotType() ) )
{
if( rInStm.Read( '=' ) )
{
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 50fe11bd20f4..393eb42c58bb 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -172,32 +172,31 @@ bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase,
{
bool bOk = false;
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->Is( SvHash_interface() ) )
+ if( rTok.Is( SvHash_interface() ) )
{
SetType( MetaTypeType::Interface );
bOk = ReadNamesSvIdl( rInStm );
}
- else if( pTok->Is( SvHash_shell() ) )
+ else if( rTok.Is( SvHash_shell() ) )
{
SetType( MetaTypeType::Shell );
bOk = ReadNamesSvIdl( rInStm );
}
- else if( pTok->Is( SvHash_struct() ) )
+ else if( rTok.Is( SvHash_struct() ) )
{
SetType( MetaTypeType::Struct );
bOk = ReadNamesSvIdl( rInStm );
}
- else if( pTok->Is( SvHash_enum() ) )
+ else if( rTok.Is( SvHash_enum() ) )
{
SetType( MetaTypeType::Enum );
bOk = ReadNameSvIdl( rInStm );
}
- else if( pTok->Is( SvHash_item() ) )
+ else if( rTok.Is( SvHash_item() ) )
{
- if( pTok->Is( SvHash_item() ) )
- bIsItem = true;
+ bIsItem = true;
SvMetaType * pType = rBase.ReadKnownType( rInStm );
if( pType )
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 0a153515c65f..bb6318f99400 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -139,24 +139,24 @@ bool SvIdlDataBase::ReadIdFile( const OUString & rFileName )
SvTokenStream aTokStm( aFullName );
if( aTokStm.GetStream().GetError() == SVSTREAM_OK )
{
- SvToken * pTok = aTokStm.GetToken_Next();
+ SvToken& rTok = aTokStm.GetToken_Next();
- while( !pTok->IsEof() )
+ while( !rTok.IsEof() )
{
- if( pTok->IsChar() && pTok->GetChar() == '#' )
+ if( rTok.IsChar() && rTok.GetChar() == '#' )
{
- pTok = aTokStm.GetToken_Next();
- if( pTok->Is( SvHash_define() ) )
+ rTok = aTokStm.GetToken_Next();
+ if( rTok.Is( SvHash_define() ) )
{
- pTok = aTokStm.GetToken_Next();
+ rTok = aTokStm.GetToken_Next();
OString aDefName;
- if( pTok->IsIdentifier() )
- aDefName = pTok->GetString();
+ if( rTok.IsIdentifier() )
+ aDefName = rTok.GetString();
else
{
OString aStr("unexpected token after define");
// set error
- SetError( aStr, *pTok );
+ SetError( aStr, rTok );
WriteError( aTokStm );
return false;
}
@@ -165,41 +165,41 @@ bool SvIdlDataBase::ReadIdFile( const OUString & rFileName )
bool bOk = true;
while( bOk )
{
- pTok = aTokStm.GetToken_Next();
- if( pTok->IsIdentifier() )
+ rTok = aTokStm.GetToken_Next();
+ if( rTok.IsIdentifier() )
{
sal_uLong n;
- if( FindId( pTok->GetString(), &n ) )
+ if( FindId( rTok.GetString(), &n ) )
nVal += n;
else
bOk = false;
}
- else if( pTok->IsChar() )
+ else if( rTok.IsChar() )
{
- if( pTok->GetChar() == '-'
- || pTok->GetChar() == '/'
- || pTok->GetChar() == '*'
- || pTok->GetChar() == '&'
- || pTok->GetChar() == '|'
- || pTok->GetChar() == '^'
- || pTok->GetChar() == '~' )
+ if( rTok.GetChar() == '-'
+ || rTok.GetChar() == '/'
+ || rTok.GetChar() == '*'
+ || rTok.GetChar() == '&'
+ || rTok.GetChar() == '|'
+ || rTok.GetChar() == '^'
+ || rTok.GetChar() == '~' )
{
- OString aStr = "unknown operator '" + OString(pTok->GetChar()) + "'in define";
+ OString aStr = "unknown operator '" + OString(rTok.GetChar()) + "'in define";
// set error
- SetError( aStr, *pTok );
+ SetError( aStr, rTok );
WriteError( aTokStm );
return false;
}
- if( pTok->GetChar() != '+'
- && pTok->GetChar() != '('
- && pTok->GetChar() != ')' )
+ if( rTok.GetChar() != '+'
+ && rTok.GetChar() != '('
+ && rTok.GetChar() != ')' )
// only + is allowed, parentheses are immaterial
// because + is commutative
break;
}
- else if( pTok->IsInteger() )
+ else if( rTok.IsInteger() )
{
- nVal += pTok->GetNumber();
+ nVal += rTok.GetNumber();
}
else
break;
@@ -209,32 +209,32 @@ bool SvIdlDataBase::ReadIdFile( const OUString & rFileName )
if( !InsertId( aDefName, nVal ) )
{
OString aStr("hash table overflow: ");
- SetError( aStr, *pTok );
+ SetError( aStr, rTok );
WriteError( aTokStm );
return false;
}
}
}
- else if( pTok->Is( SvHash_include() ) )
+ else if( rTok.Is( SvHash_include() ) )
{
- pTok = aTokStm.GetToken_Next();
+ rTok = aTokStm.GetToken_Next();
OStringBuffer aName;
- if( pTok->IsString() )
- aName.append(pTok->GetString());
- else if( pTok->IsChar() && pTok->GetChar() == '<' )
+ if( rTok.IsString() )
+ aName.append(rTok.GetString());
+ else if( rTok.IsChar() && rTok.GetChar() == '<' )
{
- pTok = aTokStm.GetToken_Next();
- while( !pTok->IsEof()
- && !(pTok->IsChar() && pTok->GetChar() == '>') )
+ rTok = aTokStm.GetToken_Next();
+ while( !rTok.IsEof()
+ && !(rTok.IsChar() && rTok.GetChar() == '>') )
{
- aName.append(pTok->GetTokenAsString());
- pTok = aTokStm.GetToken_Next();
+ aName.append(rTok.GetTokenAsString());
+ rTok = aTokStm.GetToken_Next();
}
- if( pTok->IsEof() )
+ if( rTok.IsEof() )
{
OString aStr("unexpected eof in #include");
// set error
- SetError(aStr, *pTok);
+ SetError(aStr, rTok);
WriteError( aTokStm );
return false;
}
@@ -242,14 +242,14 @@ bool SvIdlDataBase::ReadIdFile( const OUString & rFileName )
if (!ReadIdFile(OStringToOUString(aName.toString(),
RTL_TEXTENCODING_ASCII_US)))
{
- SetError("cannot read file: " + aName, *pTok);
+ SetError("cannot read file: " + aName, rTok);
WriteError( aTokStm );
return false;
}
}
}
else
- pTok = aTokStm.GetToken_Next();
+ rTok = aTokStm.GetToken_Next();
}
}
else
@@ -277,9 +277,9 @@ SvMetaType * SvIdlDataBase::FindType( const OString& rName )
SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->HasHash() )
+ if( rTok.HasHash() )
{
sal_uInt32 nBeginPos = 0; // can not happen with Tell
while( nBeginPos != rInStm.Tell() )
@@ -288,9 +288,9 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
}
}
- if( pTok->IsIdentifier() )
+ if( rTok.IsIdentifier() )
{
- OString aName = pTok->GetString();
+ OString aName = rTok.GetString();
SvRefMemberList<SvMetaType *> & rList = GetTypeList();
SvRefMemberList<SvMetaType *>::const_iterator it = rList.begin();
SvMetaType * pType = nullptr;
@@ -328,22 +328,22 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
if( !pType )
{
// otherwise SlotId?
- SvToken * pTok = rInStm.GetToken_Next();
- if( pTok->IsIdentifier() )
+ SvToken& rTok = rInStm.GetToken_Next();
+ if( rTok.IsIdentifier() )
{
sal_uLong n;
- if( FindId( pTok->GetString(), &n ) )
+ if( FindId( rTok.GetString(), &n ) )
{
for( sal_uLong i = 0; i < aSlotList.size(); i++ )
{
SvMetaSlot * pSlot = aSlotList[i];
- if( pSlot->GetSlotId().getString().equals(pTok->GetString()) )
+ if( pSlot->GetSlotId().getString().equals(rTok.GetString()) )
return pSlot;
}
}
OStringBuffer aStr("Not found : ");
- aStr.append(pTok->GetString());
+ aStr.append(rTok.GetString());
OSL_FAIL(aStr.getStr());
}
}
@@ -374,13 +374,13 @@ SvMetaAttribute* SvIdlDataBase::SearchKnownAttr
SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
- SvToken * pTok = rInStm.GetToken_Next();
+ SvToken& rTok = rInStm.GetToken_Next();
- if( pTok->IsIdentifier() )
+ if( rTok.IsIdentifier() )
for( sal_uLong n = 0; n < aClassList.size(); n++ )
{
SvMetaClass * pClass = aClassList[n];
- if( pClass->GetName().equals(pTok->GetString()) )
+ if( pClass->GetName().equals(rTok.GetString()) )
return pClass;
}
@@ -417,11 +417,11 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
sal_uLong nRow = 0, nColumn = 0;
rInStm.SeekEnd();
- SvToken *pTok = &rInStm.GetToken();
+ SvToken& rTok = rInStm.GetToken();
// error position
- nRow = pTok->GetLine();
- nColumn = pTok->GetColumn();
+ nRow = rTok.GetLine();
+ nColumn = rTok.GetColumn();
if( aError.IsError() )
{ // error set
@@ -433,13 +433,13 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
aErrorText.append(aError.GetText());
}
SvToken * pPrevTok = nullptr;
- while( pTok != pPrevTok )
+ while( &rTok != pPrevTok )
{
- pPrevTok = pTok;
- if( pTok->GetLine() == aError.nLine
- && pTok->GetColumn() == aError.nColumn )
+ pPrevTok = &rTok;
+ if( rTok.GetLine() == aError.nLine
+ && rTok.GetColumn() == aError.nColumn )
break;
- pTok = rInStm.GetToken_PrevAll();
+ rTok = rInStm.GetToken_PrevAll();
}
// error position
@@ -456,21 +456,17 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
WriteError("error", OUStringToOString(aFileName,
RTL_TEXTENCODING_UTF8), aErrorText.makeStringAndClear(), nRow, nColumn);
- DBG_ASSERT( pTok, "token must be found" );
- if( !pTok )
- return;
-
// look for identifier close by
- if( !pTok->IsIdentifier() )
+ if( !rTok.IsIdentifier() )
{
rInStm.GetToken_PrevAll();
- pTok = &rInStm.GetToken();
+ rTok = rInStm.GetToken();
}
- if( pTok && pTok->IsIdentifier() )
+ if( rTok.IsIdentifier() )
{
- OString aN = GetIdlApp().pHashTable->GetNearString( pTok->GetString() );
+ OString aN = GetIdlApp().pHashTable->GetNearString( rTok.GetString() );
if( !aN.isEmpty() )
- fprintf( stderr, "%s versus %s\n", pTok->GetString().getStr(), aN.getStr() );
+ fprintf( stderr, "%s versus %s\n", rTok.GetString().getStr(), aN.getStr() );
}
}
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 );