Kaydet (Commit) dd7eeed2 authored tarafından August Sodora's avatar August Sodora

Remove uses of pLine in scanner

üst 6b3ed4a5
...@@ -114,7 +114,7 @@ void SbiScanner::GenError( SbError code ) ...@@ -114,7 +114,7 @@ void SbiScanner::GenError( SbError code )
// used by SbiTokenizer::MayBeLabel() to detect a label // used by SbiTokenizer::MayBeLabel() to detect a label
bool SbiScanner::DoesColonFollow() bool SbiScanner::DoesColonFollow()
{ {
if( pLine && *pLine == ':' ) if(nCol < aLine.getLength() && aLine[nCol] == ':')
{ {
pLine++; nCol++; pLine++; nCol++;
return true; return true;
...@@ -152,7 +152,7 @@ static SbxDataType GetSuffixType( sal_Unicode c ) ...@@ -152,7 +152,7 @@ static SbxDataType GetSuffixType( sal_Unicode c )
void SbiScanner::scanAlphanumeric() void SbiScanner::scanAlphanumeric()
{ {
sal_Int32 n = nCol; sal_Int32 n = nCol;
while(theBasicCharClass::get().isAlphaNumeric(*pLine, bCompatible) || *pLine == '_') while(nCol < aLine.getLength() && (theBasicCharClass::get().isAlphaNumeric(aLine[nCol], bCompatible) || aLine[nCol] == '_'))
{ {
pLine++; pLine++;
nCol++; nCol++;
...@@ -242,13 +242,13 @@ bool SbiScanner::NextSym() ...@@ -242,13 +242,13 @@ bool SbiScanner::NextSym()
nCol1 = nCol; nCol1 = nCol;
// only blank line? // only blank line?
if( !*pLine ) if(nCol >= aLine.getLength())
goto eoln; goto eoln;
if( bPrevLineExtentsComment ) if( bPrevLineExtentsComment )
goto PrevLineCommentLbl; goto PrevLineCommentLbl;
if( *pLine == '#' ) if(nCol < aLine.getLength() && aLine[nCol] == '#')
{ {
pLine++; pLine++;
nCol++; nCol++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment