This is an automated email from the ASF dual-hosted git repository. jianliangqi pushed a commit to branch clucene in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push: new 383dc029 [Fix] fix clucene gcc compile error (#89) 383dc029 is described below commit 383dc029059a7fc7ff61893af1371570bc20b5f1 Author: zzzxl <33418555+zzzxl1...@users.noreply.github.com> AuthorDate: Wed Jun 14 16:26:09 2023 +0800 [Fix] fix clucene gcc compile error (#89) --- src/core/CLucene/analysis/AnalysisHeader.cpp | 7 ------- src/core/CLucene/analysis/AnalysisHeader.h | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/core/CLucene/analysis/AnalysisHeader.cpp b/src/core/CLucene/analysis/AnalysisHeader.cpp index f90085c0..bd2e3b3e 100644 --- a/src/core/CLucene/analysis/AnalysisHeader.cpp +++ b/src/core/CLucene/analysis/AnalysisHeader.cpp @@ -36,13 +36,6 @@ TokenStream* Analyzer::reusableTokenStream(const TCHAR* fieldName, CL_NS(util):: return tokenStream(fieldName, reader); } -template <> -size_t Token::termLength<TCHAR>(){ - if ( _termTextLen == -1 ) //it was invalidated by growBuffer - _termTextLen = _tcslen((TCHAR*)_buffer); - return _termTextLen; -}; - ///Compares the Token for their order class OrderCompare:LUCENE_BASE, public CL_NS(util)::Compare::_base //<Token*> { diff --git a/src/core/CLucene/analysis/AnalysisHeader.h b/src/core/CLucene/analysis/AnalysisHeader.h index 07beb9e4..c1d3381f 100644 --- a/src/core/CLucene/analysis/AnalysisHeader.h +++ b/src/core/CLucene/analysis/AnalysisHeader.h @@ -10,6 +10,7 @@ #include "CLucene/index/Payload.h" #include "CLucene/util/VoidList.h" #include "CLucene/LuceneThreads.h" +#include "CLucene/config/repl_tchar.h" CL_CLASS_DEF(util,Reader) CL_CLASS_DEF(util,IReader) @@ -223,6 +224,13 @@ inline size_t Token::termLength<char>(){ return _termTextLen; }; +template <> +inline size_t Token::termLength<TCHAR>(){ + if ( _termTextLen == -1 ) //it was invalidated by growBuffer + _termTextLen = _tcslen((TCHAR*)_buffer); + return _termTextLen; +}; + class CLUCENE_EXPORT TokenStream { public: /** Returns the next token in the stream, or null at EOS. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org