- Drop convertChainToWstrings(), it's not used anymore.

This commit is contained in:
Konstantin Isakov 2009-04-17 14:09:53 +00:00
parent 629a138f7e
commit f07030deba
2 changed files with 0 additions and 36 deletions

View file

@ -678,38 +678,6 @@ vector< WordArticleLink > BtreeDictionary::readChain( char const * & ptr )
return result;
}
vector< wstring > BtreeDictionary::convertChainToWstrings(
vector< WordArticleLink > const & chain )
{
vector< wchar_t > wcharBuffer;
vector< wstring > result;
for( unsigned x = 0; x < chain.size(); ++x )
{
unsigned wordSize = chain[ x ].word.size();
if ( wcharBuffer.size() <= wordSize )
wcharBuffer.resize( wordSize + 1 );
long len = Utf8::decode( chain[ x ].word.data(), wordSize,
&wcharBuffer.front() );
if ( len < 0 )
{
fprintf( stderr, "Failed to decode utf8 of a word %s, skipping it.\n",
chain[ x ].word.c_str() );
continue;
}
wcharBuffer[ len ] = 0;
result.push_back( &wcharBuffer.front() );
}
return result;
}
void BtreeDictionary::antialias( wstring const & str,
vector< WordArticleLink > & chain )
{

View file

@ -128,10 +128,6 @@ private:
/// is updated to point to the next chain, if there's any.
vector< WordArticleLink > readChain( char const * & );
/// Converts words in a chain to a vector of wide strings. The article
/// offsets don't get used.
vector< wstring > convertChainToWstrings( vector< WordArticleLink > const & );
/// Drops any alises which arose due to folding. Only case-folded aliases
/// are left.
void antialias( wstring const &, vector< WordArticleLink > & );