diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-23 10:13:00 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-26 11:05:01 +0900 |
| commit | 3b1e4bbb3df6a0de8aa0693038449c6f0359ce91 (patch) | |
| tree | 068068e7b1b6202c635bd655e346f838d715373c /indexlib/ifile.h | |
| parent | b0f8eef013163b2098c2bb07e93cb9b194338b80 (diff) | |
| download | tdepim-3b1e4bbb.tar.gz tdepim-3b1e4bbb.zip | |
Replace auto_ptr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d2f343cc239e1fa25c9581cf35bada96692c41db)
Diffstat (limited to 'indexlib/ifile.h')
| -rw-r--r-- | indexlib/ifile.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indexlib/ifile.h b/indexlib/ifile.h index 4cfcf585..3fcf772e 100644 --- a/indexlib/ifile.h +++ b/indexlib/ifile.h @@ -43,8 +43,10 @@ struct ifile : public indexlib::index { public: ifile( std::string ); + ifile(ifile const &) = delete; + ifile& operator=(ifile const &) = delete; virtual void add( const char* str, const char* doc ); - virtual std::auto_ptr<indexlib::result> search( const char* ) const; + virtual std::unique_ptr<indexlib::result> search( const char* ) const; virtual unsigned ndocs() const { return docnames_.size(); } virtual std::string lookup_docname( unsigned idx ) const { return docnames_.get( idx ); } @@ -56,7 +58,7 @@ struct ifile : public indexlib::index { private: std::set<unsigned> find_word( std::string ) const; std::vector<std::string> break_clean( const char* ) const; - virtual std::auto_ptr<indexlib::result> everything() const; + virtual std::unique_ptr<indexlib::result> everything() const; static bool invalid_word( std::string ); bool is_stop_word( std::string ) const; @@ -67,7 +69,7 @@ struct ifile : public indexlib::index { stringset words_; stringset stopwords_; leafdatavector files_; - std::auto_ptr<indexlib::detail::tokenizer> tokenizer_; + std::unique_ptr<indexlib::detail::tokenizer> tokenizer_; }; #endif /* _IFILE_INCLUDE_GUARD_LPC_56465465798732 */ |
