summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2015-03-09 15:47:51 -0400
committerJason Rassi <rassi@10gen.com>2015-03-10 11:48:18 -0400
commit17762d0b22b816f863d11406f60d8d332687a943 (patch)
tree8782ad0cb9deb4b01f68af964b810953dff70198
parentc6c136a7def8ab1f78ccd5d53034af510436e776 (diff)
downloadmongo-17762d0b22b816f863d11406f60d8d332687a943.tar.gz
SERVER-17437 Minor style/formatting fixes in db/fts/
-rw-r--r--src/mongo/db/fts/fts_index_format.h4
-rw-r--r--src/mongo/db/fts/fts_matcher.h1
-rw-r--r--src/mongo/db/fts/fts_query.cpp1
-rw-r--r--src/mongo/db/fts/stemmer.cpp2
-rw-r--r--src/mongo/db/fts/stemmer.h1
-rw-r--r--src/mongo/db/fts/stop_words.h1
-rw-r--r--src/mongo/db/fts/tokenizer.cpp2
-rw-r--r--src/mongo/db/fts/tokenizer.h1
8 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/db/fts/fts_index_format.h b/src/mongo/db/fts/fts_index_format.h
index 187e52ce0dc..579afb2d673 100644
--- a/src/mongo/db/fts/fts_index_format.h
+++ b/src/mongo/db/fts/fts_index_format.h
@@ -48,7 +48,7 @@ namespace mongo {
const BSONObj& document,
BSONObjSet* keys );
- /*
+ /**
* Helper method to get return entry from the FTSIndex as a BSONObj
* @param weight, the weight of the term in the entry
* @param term, the std::string term in the entry
@@ -61,7 +61,7 @@ namespace mongo {
TextIndexVersion textIndexVersion );
private:
- /*
+ /**
* Helper method to get return entry from the FTSIndex as a BSONObj
* @param b, reference to the BSONOBjBuilder
* @param weight, the weight of the term in the entry
diff --git a/src/mongo/db/fts/fts_matcher.h b/src/mongo/db/fts/fts_matcher.h
index 3e3b971ddc3..1ddf5f80ebd 100644
--- a/src/mongo/db/fts/fts_matcher.h
+++ b/src/mongo/db/fts/fts_matcher.h
@@ -39,6 +39,7 @@ namespace mongo {
namespace fts {
class FTSMatcher {
+ MONGO_DISALLOW_COPYING( FTSMatcher );
public:
FTSMatcher( const FTSQuery& query, const FTSSpec& spec );
diff --git a/src/mongo/db/fts/fts_query.cpp b/src/mongo/db/fts/fts_query.cpp
index d5004d00ce7..e70732023eb 100644
--- a/src/mongo/db/fts/fts_query.cpp
+++ b/src/mongo/db/fts/fts_query.cpp
@@ -31,6 +31,7 @@
#include "mongo/platform/basic.h"
#include "mongo/db/fts/fts_query.h"
+
#include "mongo/db/fts/fts_spec.h"
#include "mongo/db/fts/tokenizer.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/fts/stemmer.cpp b/src/mongo/db/fts/stemmer.cpp
index 4a9615ceaee..4a734dbe316 100644
--- a/src/mongo/db/fts/stemmer.cpp
+++ b/src/mongo/db/fts/stemmer.cpp
@@ -63,7 +63,7 @@ namespace mongo {
if ( sb_sym == NULL ) {
// out of memory
- abort();
+ invariant( false );
}
return string( (const char*)(sb_sym), sb_stemmer_length( _stemmer ) );
diff --git a/src/mongo/db/fts/stemmer.h b/src/mongo/db/fts/stemmer.h
index 40c47afc150..6abba8abddc 100644
--- a/src/mongo/db/fts/stemmer.h
+++ b/src/mongo/db/fts/stemmer.h
@@ -47,6 +47,7 @@ namespace mongo {
* running/Running -> run/Run
*/
class Stemmer {
+ MONGO_DISALLOW_COPYING( Stemmer );
public:
Stemmer( const FTSLanguage& language );
~Stemmer();
diff --git a/src/mongo/db/fts/stop_words.h b/src/mongo/db/fts/stop_words.h
index 04fb35c3d4d..4789535ef4d 100644
--- a/src/mongo/db/fts/stop_words.h
+++ b/src/mongo/db/fts/stop_words.h
@@ -42,6 +42,7 @@ namespace mongo {
namespace fts {
class StopWords {
+ MONGO_DISALLOW_COPYING( StopWords );
public:
StopWords();
StopWords( const std::set<std::string>& words );
diff --git a/src/mongo/db/fts/tokenizer.cpp b/src/mongo/db/fts/tokenizer.cpp
index 61e5b09a706..ee60f99d588 100644
--- a/src/mongo/db/fts/tokenizer.cpp
+++ b/src/mongo/db/fts/tokenizer.cpp
@@ -55,7 +55,7 @@ namespace mongo {
unsigned start = _pos++;
Token::Type type = _type( _raw[start] );
- if ( type == Token::WHITESPACE ) abort();
+ if ( type == Token::WHITESPACE ) invariant( false );
if ( type == Token::TEXT )
while ( _pos < _raw.size() && _type( _raw[_pos] ) == type )
diff --git a/src/mongo/db/fts/tokenizer.h b/src/mongo/db/fts/tokenizer.h
index 3d459692563..cd0d76a4f70 100644
--- a/src/mongo/db/fts/tokenizer.h
+++ b/src/mongo/db/fts/tokenizer.h
@@ -59,6 +59,7 @@ namespace mongo {
};
class Tokenizer {
+ MONGO_DISALLOW_COPYING( Tokenizer );
public:
Tokenizer( const FTSLanguage& language, StringData str );