2011-03-10 18:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/pp/ppcore.c
    % small optimization
This commit is contained in:
Przemyslaw Czerpak
2011-03-10 17:56:31 +00:00
parent 37bfb36fc3
commit 2f4cd8c8c0
2 changed files with 13 additions and 4 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-03-10 18:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/pp/ppcore.c
% small optimization
2011-03-10 17:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
* harbour/include/hbvmpub.h

View File

@@ -272,8 +272,9 @@ static const HB_PP_OPERATOR * hb_pp_operatorFind( PHB_PP_STATE pState,
while( --i >= 0 )
{
if( pOperator->len <= nLen &&
hb_strnicmp( pOperator->name, buffer, pOperator->len ) == 0 )
if( pOperator->len <= nLen && pOperator->name[ 0 ] == buffer[ 0 ] &&
( pOperator->len == 1 ||
hb_strnicmp( pOperator->name + 1, buffer + 1, pOperator->len - 1 ) == 0 ) )
return pOperator;
++pOperator;
@@ -284,8 +285,12 @@ static const HB_PP_OPERATOR * hb_pp_operatorFind( PHB_PP_STATE pState,
do
{
if( pOperator->len <= nLen &&
hb_strnicmp( pOperator->name, buffer, pOperator->len ) == 0 )
if( pOperator->len <= nLen && pOperator->name[ 0 ] == buffer[ 0 ] &&
( pOperator->len == 1 ||
( pOperator->len >= 4 ?
hb_strnicmp( pOperator->name + 1, buffer + 1, pOperator->len - 1 ) == 0 :
( pOperator->name[ 1 ] == buffer[ 1 ] &&
( pOperator->len == 2 || pOperator->name[ 2 ] == buffer[ 2 ] ) ) ) ) )
return pOperator;
++pOperator;