summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-04-04 21:42:26 -0400
committerBenety Goh <benety@mongodb.com>2018-04-04 21:42:26 -0400
commit80f409d1311eb8d20251d17be474aff382538b84 (patch)
treea8134ca8928240b84414f8faf75c7af06119915b /src/mongo/db/fts
parentc3badcbbcf069f428a765ba5937106d1da814076 (diff)
downloadmongo-80f409d1311eb8d20251d17be474aff382538b84.tar.gz
SERVER-34307 replace invariant(false) with MONGO_UNREACHABLE
Diffstat (limited to 'src/mongo/db/fts')
-rw-r--r--src/mongo/db/fts/fts_query_impl.cpp2
-rw-r--r--src/mongo/db/fts/fts_query_parser.cpp2
-rw-r--r--src/mongo/db/fts/stemmer.cpp2
-rw-r--r--src/mongo/db/fts/tokenizer.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/fts/fts_query_impl.cpp b/src/mongo/db/fts/fts_query_impl.cpp
index 040333de5c7..a259759a2f3 100644
--- a/src/mongo/db/fts/fts_query_impl.cpp
+++ b/src/mongo/db/fts/fts_query_impl.cpp
@@ -127,7 +127,7 @@ Status FTSQueryImpl::parse(TextIndexVersion textIndexVersion) {
}
}
} else {
- invariant(false);
+ MONGO_UNREACHABLE;
}
}
diff --git a/src/mongo/db/fts/fts_query_parser.cpp b/src/mongo/db/fts/fts_query_parser.cpp
index 6b2381c3366..1a8bcae4025 100644
--- a/src/mongo/db/fts/fts_query_parser.cpp
+++ b/src/mongo/db/fts/fts_query_parser.cpp
@@ -54,7 +54,7 @@ QueryToken FTSQueryParser::next() {
// Query Parser should never land on whitespace
if (type == QueryToken::WHITESPACE) {
- invariant(false);
+ MONGO_UNREACHABLE;
}
if (type == QueryToken::TEXT) {
diff --git a/src/mongo/db/fts/stemmer.cpp b/src/mongo/db/fts/stemmer.cpp
index 19995baae4e..703e805d47f 100644
--- a/src/mongo/db/fts/stemmer.cpp
+++ b/src/mongo/db/fts/stemmer.cpp
@@ -59,7 +59,7 @@ StringData Stemmer::stem(StringData word) const {
if (sb_sym == NULL) {
// out of memory
- invariant(false);
+ MONGO_UNREACHABLE;
}
return StringData((const char*)(sb_sym), sb_stemmer_length(_stemmer));
diff --git a/src/mongo/db/fts/tokenizer.cpp b/src/mongo/db/fts/tokenizer.cpp
index e1f595b9a4a..a77dc6b0136 100644
--- a/src/mongo/db/fts/tokenizer.cpp
+++ b/src/mongo/db/fts/tokenizer.cpp
@@ -54,7 +54,7 @@ Token Tokenizer::next() {
unsigned start = _pos++;
Token::Type type = _type(_raw[start]);
if (type == Token::WHITESPACE)
- invariant(false);
+ MONGO_UNREACHABLE;
if (type == Token::TEXT)
while (_pos < _raw.size() && _type(_raw[_pos]) == type)