You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2002/11/28 20:19:12 UTC

cvs commit: xml-xerces/c/src/xercesc/internal XMLReader.hpp

knoaman     2002/11/28 11:19:12

  Modified:    c/src/xercesc/internal XMLReader.hpp
  Log:
  Performance: remove unnecessary if condition.
  
  Revision  Changes    Path
  1.7       +10 -21    xml-xerces/c/src/xercesc/internal/XMLReader.hpp
  
  Index: XMLReader.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XMLReader.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLReader.hpp	28 Nov 2002 18:17:22 -0000	1.6
  +++ XMLReader.hpp	28 Nov 2002 19:19:12 -0000	1.7
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.7  2002/11/28 19:19:12  knoaman
  + * Performance: remove unnecessary if condition.
  + *
    * Revision 1.6  2002/11/28 18:17:22  knoaman
    * Performance: make getNextChar/peekNextChar inline.
    *
  @@ -772,22 +775,15 @@
           // Its not the one we want to skip so bump the index
           chGotten = fCharBuf[fCharIndex++];
       }
  -     else
  +    else
       {
           // If fNoMore is set, then we have nothing else to give
           if (fNoMore)
               return false;
   
  -        // If the buffer is empty, then try to refresh
  -        if (fCharIndex == fCharsAvail)
  -        {
  -            if (!refreshCharBuffer())
  -            {
  -                // If still empty, then return false
  -                if (fCharIndex == fCharsAvail)
  -                    return false;
  -            }
  -        }
  +        // Try to refresh
  +        if (!refreshCharBuffer())
  +            return false;
   
           // Check the next char
           if (fCharBuf[fCharIndex] == chNotToGet)
  @@ -872,16 +868,9 @@
           if (fNoMore)
               return false;
   
  -        // If the buffer is empty, then try to refresh
  -        if (fCharIndex == fCharsAvail)
  -        {
  -            refreshCharBuffer();
  -
  -            // If still empty, then return false
  -            if (fCharIndex == fCharsAvail)
  -                return false;
  -        }
  -
  +        // Try to refresh
  +        if (!refreshCharBuffer())
  +            return false;
       }
   
       chGotten = fCharBuf[fCharIndex++];
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org