summaryrefslogtreecommitdiffstats
path: root/indexlib/quotes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/quotes.cpp')
-rw-r--r--indexlib/quotes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indexlib/quotes.cpp b/indexlib/quotes.cpp
index e4c35db43..abf8915cd 100644
--- a/indexlib/quotes.cpp
+++ b/indexlib/quotes.cpp
@@ -68,12 +68,12 @@ void quotes::remove_doc( const char* doc ) {
impl_.remove_doc( doc );
}
-std::auto_ptr<indexlib::result> quotes::search( const char* cstr ) const {
+std::unique_ptr<indexlib::result> quotes::search( const char* cstr ) const {
std::string str = cstr;
if ( str[ 0 ] != '\"' ) return impl_.search( cstr );
str = cstr + 1; // cut "
if ( str.size() && str[ str.size() - 1 ] == '\"' ) str.erase( str.size() - 1 );
- std::auto_ptr<indexlib::result> prev = impl_.search( str.c_str() );
+ std::unique_ptr<indexlib::result> prev = impl_.search( str.c_str() );
if ( str.find( ' ' ) != std::string::npos ) {
indexlib::Match m( str );
std::vector<unsigned> candidates = prev->list();
@@ -86,7 +86,7 @@ std::auto_ptr<indexlib::result> quotes::search( const char* cstr ) const {
res.push_back( *first );
}
}
- return std::auto_ptr<indexlib::result>( new indexlib::detail::simple_result( res ) );
+ return std::unique_ptr<indexlib::result>( new indexlib::detail::simple_result( res ) );
} else { return prev; }
}