summaryrefslogtreecommitdiffstats
path: root/indexlib/match.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/match.cpp')
-rw-r--r--indexlib/match.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indexlib/match.cpp b/indexlib/match.cpp
index a73dc5f5a..03851a841 100644
--- a/indexlib/match.cpp
+++ b/indexlib/match.cpp
@@ -47,17 +47,17 @@ namespace {
}
indexlib::Match::Match( std::string str, unsigned flags ):
- masks_( 256 ),
+ tqmasks_( 256 ),
caseinsensitive_( flags & caseinsensitive ),
pattern_rest_( str, kMin( str.size(), sizeof( unsigned ) * 8 - 1 ) )
{
hot_bit_ = kMin( str.size(), sizeof( unsigned ) * 8 - 1 );
for ( unsigned i = 0; i != hot_bit_; ++i ) {
if ( caseinsensitive_ ) {
- setbit( masks_[ ( unsigned char )std::toupper( str[ i ] ) ], i );
- setbit( masks_[ ( unsigned char )std::tolower( str[ i ] ) ], i );
+ setbit( tqmasks_[ ( unsigned char )std::toupper( str[ i ] ) ], i );
+ setbit( tqmasks_[ ( unsigned char )std::tolower( str[ i ] ) ], i );
} else {
- setbit( masks_[ ( unsigned char )str[ i ] ], i );
+ setbit( tqmasks_[ ( unsigned char )str[ i ] ], i );
}
}
}
@@ -69,7 +69,7 @@ bool indexlib::Match::process( const char* string ) const {
unsigned state = 0;
while ( *string ) {
state |= 1;
- state &= masks_[ ( unsigned char )*string ];
+ state &= tqmasks_[ ( unsigned char )*string ];
state <<= 1;
++string;
if ( getbit( state, hot_bit_ ) && ( pattern_rest_ == std::string( string, pattern_rest_.size() ) ) ) return true;