bug fixes; more docs; lots of new testing
git-svn-id: svn://10.0.0.236/trunk@6315 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -257,7 +257,11 @@ nsresult CScanner::Eof() {
|
||||
* @return error code reflecting read status
|
||||
*/
|
||||
nsresult CScanner::GetChar(PRUnichar& aChar) {
|
||||
nsresult result=Eof();
|
||||
nsresult result=NS_OK;
|
||||
|
||||
if(mOffset>=mBuffer.Length())
|
||||
result=Eof();
|
||||
|
||||
if(NS_OK == result) {
|
||||
aChar=mBuffer[mOffset++];
|
||||
}
|
||||
@@ -274,7 +278,11 @@ nsresult CScanner::GetChar(PRUnichar& aChar) {
|
||||
* @return
|
||||
*/
|
||||
nsresult CScanner::Peek(PRUnichar& aChar) {
|
||||
nsresult result=Eof();
|
||||
nsresult result=NS_OK;
|
||||
|
||||
if(mOffset>=mBuffer.Length())
|
||||
result=Eof();
|
||||
|
||||
if(NS_OK == result) {
|
||||
aChar=mBuffer[mOffset];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user