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-23 10:13:00 +0900 |
commit | d2f343cc239e1fa25c9581cf35bada96692c41db (patch) | |
tree | 52a60c0c804e42a990ffb27ca69c54d7467ea814 /indexlib/ifile.h | |
parent | 3b3f9ec8f31978030c17309fae48335bea5c1587 (diff) | |
download | tdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.tar.gz tdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.zip |
Replace auto_ptr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
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 4cfcf5853..3fcf772e0 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 */ |