summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/stop_words.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/fts/stop_words.cpp')
-rw-r--r--src/mongo/db/fts/stop_words.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mongo/db/fts/stop_words.cpp b/src/mongo/db/fts/stop_words.cpp
index 66240a1ce2d..421bfae63db 100644
--- a/src/mongo/db/fts/stop_words.cpp
+++ b/src/mongo/db/fts/stop_words.cpp
@@ -28,7 +28,6 @@
* it in the license file.
*/
-#include <boost/shared_ptr.hpp>
#include <set>
#include <string>
@@ -37,18 +36,14 @@
#include "mongo/base/init.h"
#include "mongo/util/string_map.h"
-
-
namespace mongo {
- using boost::shared_ptr;
-
namespace fts {
void loadStopWordMap( StringMap< std::set< std::string > >* m );
namespace {
- StringMap< boost::shared_ptr<StopWords> > STOP_WORDS;
+ StringMap< std::shared_ptr<StopWords> > StopWordsMap;
StopWords empty;
}
@@ -61,9 +56,9 @@ namespace mongo {
_words.insert( *i );
}
- const StopWords* StopWords::getStopWords( const FTSLanguage& language ) {
- StringMap< boost::shared_ptr<StopWords> >::const_iterator i = STOP_WORDS.find( language.str() );
- if ( i == STOP_WORDS.end() )
+ const StopWords* StopWords::getStopWords( const FTSLanguage* language ) {
+ auto i = StopWordsMap.find( language->str() );
+ if ( i == StopWordsMap.end() )
return &empty;
return i->second.get();
}
@@ -75,7 +70,7 @@ namespace mongo {
for ( StringMap< std::set< std::string > >::const_iterator i = raw.begin();
i != raw.end();
++i ) {
- STOP_WORDS[i->first].reset(new StopWords( i->second ));
+ StopWordsMap[i->first].reset(new StopWords( i->second ));
}
return Status::OK();
}