summaryrefslogtreecommitdiff
path: root/idl/source
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-03-25 15:52:55 -0430
committerThorsten Behrens <tbehrens@novell.com>2011-04-11 16:31:55 +0200
commite67f849928a00062f4ad0897101c18b89f66985e (patch)
tree1c048e1fe05a90b5604eaca57c96068192d6bfb0 /idl/source
parentd57e94e8ae05d47c85ff6e969ae5faef649583d0 (diff)
Remove DECLARE_LIST( SvTokenList, SvToken * )
Diffstat (limited to 'idl/source')
-rw-r--r--idl/source/cmptools/lex.cxx26
1 files changed, 9 insertions, 17 deletions
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index f02361d57200..04281e3fcff7 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -105,7 +105,6 @@ void SvTokenStream::InitCtor()
nLine = nColumn = 0;
nBufPos = 0;
nTabSize = 4;
- pCurToken = NULL;
nMaxPos = 0;
c = GetNextChar();
FillTokenList();
@@ -115,7 +114,6 @@ SvTokenStream::SvTokenStream( const String & rFileName )
: pInStream( new SvFileStream( rFileName, STREAM_STD_READ | STREAM_NOCREATE ) )
, rInStream( *pInStream )
, aFileName( rFileName )
- , aTokList( 0x8000, 0x8000 )
{
InitCtor();
}
@@ -124,7 +122,6 @@ SvTokenStream::SvTokenStream( SvStream & rStream, const String & rFileName )
: pInStream( NULL )
, rInStream( rStream )
, aFileName( rFileName )
- , aTokList( 0x8000, 0x8000 )
{
InitCtor();
}
@@ -132,28 +129,23 @@ SvTokenStream::SvTokenStream( SvStream & rStream, const String & rFileName )
SvTokenStream::~SvTokenStream()
{
delete pInStream;
- SvToken * pTok = aTokList.Last();
- while( pTok )
- {
- delete pTok;
- pTok = aTokList.Prev();
- }
}
void SvTokenStream::FillTokenList()
{
SvToken * pToken = new SvToken();
- aTokList.Insert( pToken, LIST_APPEND );
+ aTokList.push_back(pToken);
do
{
if( !MakeToken( *pToken ) )
{
- SvToken * p = aTokList.Prev();
- *pToken = SvToken();
- if( p )
+ if (!aTokList.empty())
{
- pToken->SetLine( p->GetLine() );
- pToken->SetColumn( p->GetColumn() );
+ *pToken = SvToken();
+ boost::ptr_vector<SvToken>::const_iterator it = aTokList.begin();
+
+ pToken->SetLine(it->GetLine());
+ pToken->SetColumn(it->GetColumn());
}
break;
}
@@ -164,11 +156,11 @@ void SvTokenStream::FillTokenList()
else
{
pToken = new SvToken();
- aTokList.Insert( pToken, LIST_APPEND );
+ aTokList.push_back(pToken);
}
}
while( !pToken->IsEof() );
- pCurToken = aTokList.First();
+ pCurToken = aTokList.begin();
}
void SvTokenStream::SetCharSet( CharSet nSet )