mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-05 00:24:06 +00:00
Merge branch 'staged' into dev
This commit is contained in:
commit
6ae6ad8030
|
@ -887,7 +887,6 @@ static uint32_t buildBtreeNode( IndexedWords::const_iterator & nextIndex,
|
|||
void IndexedWords::addWord( wstring const & index_word, uint32_t articleOffset, unsigned int maxHeadwordSize )
|
||||
{
|
||||
wstring word = gd::removeTrailingZero( index_word );
|
||||
wchar const * wordBegin = word.c_str();
|
||||
string::size_type wordSize = word.size();
|
||||
|
||||
// Safeguard us against various bugs here. Don't attempt adding words
|
||||
|
@ -902,7 +901,10 @@ void IndexedWords::addWord( wstring const & index_word, uint32_t articleOffset,
|
|||
word = word.substr( 0, nonSpacePos );
|
||||
else
|
||||
word = word.substr( 0, maxHeadwordSize );
|
||||
|
||||
wordSize = word.size();
|
||||
}
|
||||
wchar const * wordBegin = word.c_str();
|
||||
|
||||
// Skip any leading whitespace
|
||||
while ( *wordBegin && Folding::isWhitespace( *wordBegin ) ) {
|
||||
|
|
Loading…
Reference in a new issue