diff options
author | August Sodora <augsod@gmail.com> | 2012-01-07 20:18:35 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2012-01-08 11:48:08 -0500 |
commit | dd7eeed27dc225281ad51e3e41be88ce753e4e8e (patch) | |
tree | 00fdcb1aa0b074fcda468d4efb4c09235f8cb42b | |
parent | 6b3ed4a5e3b76b08cdc841767e6f69854f7a43ae (diff) |
Remove uses of pLine in scanner
-rw-r--r-- | basic/source/comp/scanner.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 25a493a08aa1..137da1e01eb7 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -114,7 +114,7 @@ void SbiScanner::GenError( SbError code ) // used by SbiTokenizer::MayBeLabel() to detect a label bool SbiScanner::DoesColonFollow() { - if( pLine && *pLine == ':' ) + if(nCol < aLine.getLength() && aLine[nCol] == ':') { pLine++; nCol++; return true; @@ -152,7 +152,7 @@ static SbxDataType GetSuffixType( sal_Unicode c ) void SbiScanner::scanAlphanumeric() { sal_Int32 n = nCol; - while(theBasicCharClass::get().isAlphaNumeric(*pLine, bCompatible) || *pLine == '_') + while(nCol < aLine.getLength() && (theBasicCharClass::get().isAlphaNumeric(aLine[nCol], bCompatible) || aLine[nCol] == '_')) { pLine++; nCol++; @@ -242,13 +242,13 @@ bool SbiScanner::NextSym() nCol1 = nCol; // only blank line? - if( !*pLine ) + if(nCol >= aLine.getLength()) goto eoln; if( bPrevLineExtentsComment ) goto PrevLineCommentLbl; - if( *pLine == '#' ) + if(nCol < aLine.getLength() && aLine[nCol] == '#') { pLine++; nCol++; |