Commit bb383e22 authored by Dick Hollenbeck's avatar Dick Hollenbeck

optimize isSpace for negative 8 bit bytes

parent 56796a95
...@@ -375,7 +375,9 @@ int DSNLEXER::NeedNUMBER( const char* aExpectation ) throw( IO_ERROR ) ...@@ -375,7 +375,9 @@ int DSNLEXER::NeedNUMBER( const char* aExpectation ) throw( IO_ERROR )
*/ */
static bool isSpace( int cc ) static bool isSpace( int cc )
{ {
if( cc <= ' ' ) // cc was signed extended from signed char, so it is often negative.
// Treat negative as large positive to exclude rapidly.
if( unsigned( cc ) <= ' ' )
{ {
switch( cc ) switch( cc )
{ {
......
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