remove extra parantheses

This commit is contained in:
Xiao YiFang 2022-06-16 20:20:33 +08:00
parent 02f7fc0048
commit 947323854a

View file

@ -503,7 +503,6 @@ void FTSResultsRequest::checkSingleArticle( uint32_t offset,
if( searchMode == FTS::Wildcards || searchMode == FTS::RegExp ) if( searchMode == FTS::Wildcards || searchMode == FTS::RegExp )
{ {
// for( int i = 0; i < offsets.size(); i++ ) // for( int i = 0; i < offsets.size(); i++ )
{
if( Utils::AtomicInt::loadAcquire( isCancelled ) ) if( Utils::AtomicInt::loadAcquire( isCancelled ) )
return; return;
@ -528,7 +527,6 @@ void FTSResultsRequest::checkSingleArticle( uint32_t offset,
if( maxResults > 0 && results >= maxResults ) if( maxResults > 0 && results >= maxResults )
return; return;
} }
}
} }
else else
{ {
@ -542,7 +540,6 @@ void FTSResultsRequest::checkSingleArticle( uint32_t offset,
} }
// for( int i = 0; i < offsets.size(); i++ ) // for( int i = 0; i < offsets.size(); i++ )
{
if( Utils::AtomicInt::loadAcquire( isCancelled ) ) if( Utils::AtomicInt::loadAcquire( isCancelled ) )
return; return;
@ -652,15 +649,15 @@ void FTSResultsRequest::checkSingleArticle( uint32_t offset,
return; return;
} }
} }
}
} }
if( !offsetsForHeadwords.isEmpty() ) if( !offsetsForHeadwords.isEmpty() )
{ {
QVector< QString > headwords; QVector< QString > headwords;
Mutex::Lock _( dataMutex );
dict.getHeadwordsFromOffsets( offsetsForHeadwords, headwords, &isCancelled ); dict.getHeadwordsFromOffsets( offsetsForHeadwords, headwords, &isCancelled );
for( int x = 0; x < headwords.size(); x++ ) for( int x = 0; x < headwords.size(); x++ )
{ {
Mutex::Lock _( dataMutex );
foundHeadwords->append( FTS::FtsHeadword( headwords.at( x ), foundHeadwords->append( FTS::FtsHeadword( headwords.at( x ),
id, id,
x < hiliteRegExps.size() ? hiliteRegExps.at( x ) : QStringList(), x < hiliteRegExps.size() ? hiliteRegExps.at( x ) : QStringList(),
@ -844,7 +841,7 @@ void FTSResultsRequest::combinedIndexSearch( BtreeIndexing::BtreeIndex & ftsInde
// allWordsLinks[ wordNom ] = setOfOffsets; // allWordsLinks[ wordNom ] = setOfOffsets;
// setOfOffsets.clear(); // setOfOffsets.clear();
wordNom += 1; // wordNom += 1;
} }
if( setOfOffsets.isEmpty() ) if( setOfOffsets.isEmpty() )