summaryrefslogtreecommitdiffstats
path: root/indexlib/match.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
commitf4fae92b6768541e2952173c3d4b09040f95bf7e (patch)
treed8c5d93232235cd635f3310b4d95490df181ba2d /indexlib/match.cpp
parent125c0a08265b75a133644d3b55f47e37c919f45d (diff)
downloadtdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz
tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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;