diff --git a/src/btreeidx.cc b/src/btreeidx.cc index f696536f..efb88e94 100644 --- a/src/btreeidx.cc +++ b/src/btreeidx.cc @@ -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 ) { diff --git a/src/btreeidx.hh b/src/btreeidx.hh index 709f70aa..df487cf4 100644 --- a/src/btreeidx.hh +++ b/src/btreeidx.hh @@ -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 > & );