optimize isSpace for negative 8 bit bytes
This commit is contained in:
parent
56796a950c
commit
bb383e22b3
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue