diff options
Diffstat (limited to 'src/mongo/db/fts')
31 files changed, 89 insertions, 108 deletions
diff --git a/src/mongo/db/fts/fts_element_iterator.cpp b/src/mongo/db/fts/fts_element_iterator.cpp index ebca711dd2b..c9666f0834a 100644 --- a/src/mongo/db/fts/fts_element_iterator.cpp +++ b/src/mongo/db/fts/fts_element_iterator.cpp @@ -64,7 +64,7 @@ inline bool _matchPrefix(const string& dottedName, const string& weight) { } return str::startsWith(weight, dottedName + '.'); } -} +} // namespace bool FTSElementIterator::more() { //_currentValue = advance(); @@ -113,9 +113,10 @@ FTSIteratorValue FTSElementIterator::advance() { // 1. parent path empty (top level): use the current field name // 2. parent path non-empty and obj is an array: use the parent path // 3. parent path non-empty and obj is a sub-doc: append field name to parent path - string dottedName = (_frame._parentPath.empty() ? fieldName : _frame._isArray - ? _frame._parentPath - : _frame._parentPath + '.' + fieldName); + string dottedName = + (_frame._parentPath.empty() + ? fieldName + : _frame._isArray ? _frame._parentPath : _frame._parentPath + '.' + fieldName); // Find lower bound of dottedName in _weights. lower_bound leaves us at the first // weight that could possibly match or be a prefix of dottedName. And if this diff --git a/src/mongo/db/fts/fts_index_format.cpp b/src/mongo/db/fts/fts_index_format.cpp index d9fda7efa14..ab9950635fb 100644 --- a/src/mongo/db/fts/fts_index_format.cpp +++ b/src/mongo/db/fts/fts_index_format.cpp @@ -117,8 +117,8 @@ BSONElement extractNonFTSKeyElement(const BSONObj& obj, StringData path) { dps::extractAllElementsAlongPath( obj, path, indexedElements, expandArrayOnTrailingField, &arrayComponents); uassert(ErrorCodes::CannotBuildIndexKeys, - str::stream() << "Field '" << path << "' of text index contains an array in document: " - << obj, + str::stream() << "Field '" << path + << "' of text index contains an array in document: " << obj, arrayComponents.empty()); // Since there aren't any arrays, there cannot be more than one extracted element on 'path'. @@ -241,5 +241,5 @@ void FTSIndexFormat::_appendIndexKey(BSONObjBuilder& b, b.append("", weight); } } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_index_format.h b/src/mongo/db/fts/fts_index_format.h index cff73d5caad..dd83e8603a8 100644 --- a/src/mongo/db/fts/fts_index_format.h +++ b/src/mongo/db/fts/fts_index_format.h @@ -70,5 +70,5 @@ private: const std::string& term, TextIndexVersion textIndexVersion); }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_index_format_test.cpp b/src/mongo/db/fts/fts_index_format_test.cpp index b847d16dd9d..c9d6779e639 100644 --- a/src/mongo/db/fts/fts_index_format_test.cpp +++ b/src/mongo/db/fts/fts_index_format_test.cpp @@ -68,14 +68,12 @@ TEST(FTSIndexFormat, Simple1) { TEST(FTSIndexFormat, ExtraBack1) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data" << "text" - << "x" - << 1))))); + << "x" << 1))))); BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); FTSIndexFormat::getKeys(spec, BSON("data" << "cat" - << "x" - << 5), + << "x" << 5), &keys); ASSERT_EQUALS(1U, keys.size()); @@ -94,8 +92,7 @@ TEST(FTSIndexFormat, ExtraFront1) { FTSIndexFormat::getKeys(spec, BSON("data" << "cat" - << "x" - << 5), + << "x" << 5), &keys); ASSERT_EQUALS(1U, keys.size()); @@ -158,8 +155,7 @@ void assertEqualsIndexKeys(std::set<std::string>& expectedKeys, const BSONObjSet TEST(FTSIndexFormat, LongWordsTextIndexVersion1) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data" << "text") - << "textIndexVersion" - << 1)))); + << "textIndexVersion" << 1)))); BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); string longPrefix(1024U, 'a'); // "aaa...aaacat" @@ -188,8 +184,7 @@ TEST(FTSIndexFormat, LongWordsTextIndexVersion1) { TEST(FTSIndexFormat, LongWordTextIndexVersion2) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data" << "text") - << "textIndexVersion" - << 2)))); + << "textIndexVersion" << 2)))); BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); string longPrefix(1024U, 'a'); // "aaa...aaacat" @@ -222,8 +217,7 @@ TEST(FTSIndexFormat, LongWordTextIndexVersion2) { TEST(FTSIndexFormat, LongWordTextIndexVersion3) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data" << "text") - << "textIndexVersion" - << 3)))); + << "textIndexVersion" << 3)))); BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); string longPrefix(1024U, 'a'); // "aaa...aaacat" diff --git a/src/mongo/db/fts/fts_language.cpp b/src/mongo/db/fts/fts_language.cpp index 7d1fdd160de..ad88ccc18d4 100644 --- a/src/mongo/db/fts/fts_language.cpp +++ b/src/mongo/db/fts/fts_language.cpp @@ -82,7 +82,7 @@ LanguageMap languageMapV2; // Case-sensitive by lookup key. typedef std::map<StringData, const FTSLanguage*> LanguageMapLegacy; LanguageMapLegacy languageMapV1; -} +} // namespace MONGO_INITIALIZER_GROUP(FTSAllLanguagesRegistered, MONGO_NO_PREREQUISITES, MONGO_NO_DEPENDENTS); @@ -277,10 +277,10 @@ StatusWithFTSLanguage FTSLanguage::make(StringData langName, TextIndexVersion te if (it == languageMap->end()) { // TEXT_INDEX_VERSION_2 and above reject unrecognized language strings. - Status status = Status(ErrorCodes::BadValue, - str::stream() << "unsupported language: \"" << langName - << "\" for text index version " - << textIndexVersion); + Status status = + Status(ErrorCodes::BadValue, + str::stream() << "unsupported language: \"" << langName + << "\" for text index version " << textIndexVersion); return StatusWithFTSLanguage(status); } @@ -312,5 +312,5 @@ std::unique_ptr<FTSTokenizer> UnicodeFTSLanguage::createTokenizer() const { const FTSPhraseMatcher& UnicodeFTSLanguage::getPhraseMatcher() const { return _unicodePhraseMatcher; } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_language.h b/src/mongo/db/fts/fts_language.h index 47a6ab2213d..8bdcd1aa5ce 100644 --- a/src/mongo/db/fts/fts_language.h +++ b/src/mongo/db/fts/fts_language.h @@ -168,5 +168,5 @@ private: extern BasicFTSLanguage languagePorterV1; extern BasicFTSLanguage languageEnglishV2; extern BasicFTSLanguage languageFrenchV2; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_language_test.cpp b/src/mongo/db/fts/fts_language_test.cpp index e229bbdf0bc..29166d88319 100644 --- a/src/mongo/db/fts/fts_language_test.cpp +++ b/src/mongo/db/fts/fts_language_test.cpp @@ -175,5 +175,5 @@ TEST(FTSLanguageV1, Empty) { ASSERT(swl.getStatus().isOK()); ASSERT_EQUALS(swl.getValue()->str(), "none"); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_matcher.cpp b/src/mongo/db/fts/fts_matcher.cpp index e14a14d4464..be9daa5801d 100644 --- a/src/mongo/db/fts/fts_matcher.cpp +++ b/src/mongo/db/fts/fts_matcher.cpp @@ -176,5 +176,5 @@ FTSTokenizer::Options FTSMatcher::_getTokenizerOptions() const { return tokenizerOptions; } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_matcher.h b/src/mongo/db/fts/fts_matcher.h index 5dbcc981109..660194a9585 100644 --- a/src/mongo/db/fts/fts_matcher.h +++ b/src/mongo/db/fts/fts_matcher.h @@ -112,5 +112,5 @@ private: const FTSQueryImpl _query; const FTSSpec _spec; }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_matcher_test.cpp b/src/mongo/db/fts/fts_matcher_test.cpp index 31f05cf2268..46c292ce55a 100644 --- a/src/mongo/db/fts/fts_matcher_test.cpp +++ b/src/mongo/db/fts/fts_matcher_test.cpp @@ -278,5 +278,5 @@ TEST(FTSMatcher, NegativePhrasesMatchWithCase) { ASSERT_FALSE(docNegativePhrasesMatchWithCase("John Runs", "-\"n R\"")); ASSERT_FALSE(docNegativePhrasesMatchWithCase("John Runs", "-\"John\" -\"Running\"")); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_query_impl.cpp b/src/mongo/db/fts/fts_query_impl.cpp index c9f7e151b9d..a60ee888e66 100644 --- a/src/mongo/db/fts/fts_query_impl.cpp +++ b/src/mongo/db/fts/fts_query_impl.cpp @@ -204,5 +204,5 @@ BSONObj FTSQueryImpl::toBSON() const { bob.append("negatedPhrases", getNegatedPhr()); return bob.obj(); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_query_impl.h b/src/mongo/db/fts/fts_query_impl.h index d399ee73763..97cdb8388df 100644 --- a/src/mongo/db/fts/fts_query_impl.h +++ b/src/mongo/db/fts/fts_query_impl.h @@ -84,5 +84,5 @@ private: std::vector<std::string> _negatedPhrases; std::set<std::string> _termsForBounds; }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_query_impl_test.cpp b/src/mongo/db/fts/fts_query_impl_test.cpp index d458004b0a5..b3b4cad71f1 100644 --- a/src/mongo/db/fts/fts_query_impl_test.cpp +++ b/src/mongo/db/fts/fts_query_impl_test.cpp @@ -478,5 +478,5 @@ TEST(FTSQueryImpl, CloneParsedQuery) { ASSERT(castedClone->getNegatedPhr() == q.getNegatedPhr()); ASSERT(castedClone->getTermsForBounds() == q.getTermsForBounds()); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_query_parser.cpp b/src/mongo/db/fts/fts_query_parser.cpp index a346e03451b..c6038be4575 100644 --- a/src/mongo/db/fts/fts_query_parser.cpp +++ b/src/mongo/db/fts/fts_query_parser.cpp @@ -102,5 +102,5 @@ QueryToken::Type FTSQueryParser::getType(char c) const { return QueryToken::TEXT; } } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_query_parser.h b/src/mongo/db/fts/fts_query_parser.h index f4bab3e7e1c..4f11799337c 100644 --- a/src/mongo/db/fts/fts_query_parser.h +++ b/src/mongo/db/fts/fts_query_parser.h @@ -84,5 +84,5 @@ private: bool _previousWhiteSpace; const StringData _raw; }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_spec.cpp b/src/mongo/db/fts/fts_spec.cpp index 20560ccdad5..c358ba4b679 100644 --- a/src/mongo/db/fts/fts_spec.cpp +++ b/src/mongo/db/fts/fts_spec.cpp @@ -59,9 +59,9 @@ const std::string moduleDefaultLanguage("english"); bool validateOverride(const string& override) { // The override field can't be empty, can't be prefixed with a dollar sign, and // can't contain a dot. - return !override.empty()&& override[0] != '$' && override.find('.') == std::string::npos; -} + return !override.empty() && override[0] != '$' && override.find('.') == std::string::npos; } +} // namespace FTSSpec::FTSSpec(const BSONObj& indexInfo) { // indexInfo is a text index spec. Text index specs pass through fixSpec() before being @@ -90,12 +90,8 @@ FTSSpec::FTSSpec(const BSONObj& indexInfo) { msgasserted(17364, str::stream() << "attempt to use unsupported textIndexVersion " << textIndexVersionElt.numberInt() - << "; versions supported: " - << TEXT_INDEX_VERSION_3 - << ", " - << TEXT_INDEX_VERSION_2 - << ", " - << TEXT_INDEX_VERSION_1); + << "; versions supported: " << TEXT_INDEX_VERSION_3 << ", " + << TEXT_INDEX_VERSION_2 << ", " << TEXT_INDEX_VERSION_1); } // Initialize _defaultLanguage. Note that the FTSLanguage constructor requires @@ -272,7 +268,7 @@ Status verifyFieldNameNotReserved(StringData s) { return Status::OK(); } -} +} // namespace StatusWith<BSONObj> FTSSpec::fixSpec(const BSONObj& spec) { if (spec["textIndexVersion"].numberInt() == TEXT_INDEX_VERSION_1) { @@ -406,9 +402,7 @@ StatusWith<BSONObj> FTSSpec::fixSpec(const BSONObj& spec) { if (i->second <= 0 || i->second >= MAX_WORD_WEIGHT) { return {ErrorCodes::CannotCreateIndex, str::stream() << "text index weight must be in the exclusive interval (0," - << MAX_WORD_WEIGHT - << ") but found: " - << i->second}; + << MAX_WORD_WEIGHT << ") but found: " << i->second}; } // Verify weight refers to a valid field. @@ -513,5 +507,5 @@ StatusWith<BSONObj> FTSSpec::fixSpec(const BSONObj& spec) { return b.obj(); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_spec_legacy.cpp b/src/mongo/db/fts/fts_spec_legacy.cpp index 53169f5e213..1d58c1da750 100644 --- a/src/mongo/db/fts/fts_spec_legacy.cpp +++ b/src/mongo/db/fts/fts_spec_legacy.cpp @@ -48,7 +48,7 @@ void _addFTSStuff(BSONObjBuilder* b) { b->append("_fts", INDEX_NAME); b->append("_ftsx", 1); } -} +} // namespace const FTSLanguage& FTSSpec::_getLanguageToUseV1(const BSONObj& userDoc) const { BSONElement e = userDoc[_languageOverrideField]; @@ -240,9 +240,7 @@ StatusWith<BSONObj> FTSSpec::_fixSpecV1(const BSONObj& spec) { if (kv.second <= 0 || kv.second >= MAX_WORD_WEIGHT) { return {ErrorCodes::CannotCreateIndex, str::stream() << "text index weight must be in the exclusive interval (0," - << MAX_WORD_WEIGHT - << ") but found: " - << kv.second}; + << MAX_WORD_WEIGHT << ") but found: " << kv.second}; } b.append(kv.first, kv.second); } @@ -303,5 +301,5 @@ StatusWith<BSONObj> FTSSpec::_fixSpecV1(const BSONObj& spec) { return b.obj(); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_spec_test.cpp b/src/mongo/db/fts/fts_spec_test.cpp index f715b6f05ec..047968f2541 100644 --- a/src/mongo/db/fts/fts_spec_test.cpp +++ b/src/mongo/db/fts/fts_spec_test.cpp @@ -184,8 +184,7 @@ TEST(FTSSpec, ScoreSingleField1) { << "text" << "text" << "text") - << "weights" - << BSON("title" << 10)); + << "weights" << BSON("title" << 10)); FTSSpec spec(assertGet(FTSSpec::fixSpec(user))); @@ -204,8 +203,7 @@ TEST(FTSSpec, ScoreMultipleField1) { << "text" << "text" << "text") - << "weights" - << BSON("title" << 10)); + << "weights" << BSON("title" << 10)); FTSSpec spec(assertGet(FTSSpec::fixSpec(user))); @@ -247,8 +245,7 @@ TEST(FTSSpec, ScoreRepeatWord) { << "text" << "text" << "text") - << "weights" - << BSON("title" << 10)); + << "weights" << BSON("title" << 10)); FTSSpec spec(assertGet(FTSSpec::fixSpec(user))); @@ -273,8 +270,7 @@ TEST(FTSSpec, Extra1) { TEST(FTSSpec, Extra2) { BSONObj user = BSON("key" << BSON("data" << "text" - << "x" - << 1)); + << "x" << 1)); BSONObj fixed = assertGet(FTSSpec::fixSpec(user)); FTSSpec spec(fixed); ASSERT_EQUALS(0U, spec.numExtraBefore()); @@ -292,8 +288,7 @@ TEST(FTSSpec, Extra3) { ASSERT_BSONOBJ_EQ(BSON("x" << 1 << "_fts" << "text" - << "_ftsx" - << 1), + << "_ftsx" << 1), fixed["key"].Obj()); ASSERT_BSONOBJ_EQ(BSON("data" << 1), fixed["weights"].Obj()); @@ -520,8 +515,7 @@ TEST(FTSSpec, NestedLanguages_Wildcard) { TEST(FTSSpec, NestedLanguages_WildcardOverride) { BSONObj indexSpec = BSON("key" << BSON("$**" << "text") - << "weights" - << BSON("d.e.f" << 20)); + << "weights" << BSON("d.e.f" << 20)); FTSSpec spec(assertGet(FTSSpec::fixSpec(indexSpec))); TermFrequencyMap tfm; @@ -598,5 +592,5 @@ TEST(FTSSpec, TextIndexLegacyLanguageRecognition) { ASSERT_EQUALS(tfm.size(), 0U); // "the" recognized as stopword } } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_util.cpp b/src/mongo/db/fts/fts_util.cpp index 5ef93b16559..f9de9ae33d7 100644 --- a/src/mongo/db/fts/fts_util.cpp +++ b/src/mongo/db/fts/fts_util.cpp @@ -35,5 +35,5 @@ namespace fts { const std::string INDEX_NAME = "text"; const std::string WILDCARD = "$**"; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/fts_util.h b/src/mongo/db/fts/fts_util.h index 71eebcbf5f3..90eaa9095f6 100644 --- a/src/mongo/db/fts/fts_util.h +++ b/src/mongo/db/fts/fts_util.h @@ -46,5 +46,5 @@ enum TextIndexVersion { TEXT_INDEX_VERSION_2 = 2, // Index format with ASCII support and murmur hashing. TEXT_INDEX_VERSION_3 = 3, // Current index format with basic Unicode support. }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/stemmer.cpp b/src/mongo/db/fts/stemmer.cpp index 5b9fcdadc3c..2925ca0dbba 100644 --- a/src/mongo/db/fts/stemmer.cpp +++ b/src/mongo/db/fts/stemmer.cpp @@ -63,5 +63,5 @@ StringData Stemmer::stem(StringData word) const { return StringData((const char*)(sb_sym), sb_stemmer_length(_stemmer)); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/stemmer.h b/src/mongo/db/fts/stemmer.h index a5a15174a94..e3608071010 100644 --- a/src/mongo/db/fts/stemmer.h +++ b/src/mongo/db/fts/stemmer.h @@ -63,5 +63,5 @@ public: private: struct sb_stemmer* _stemmer; }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/stemmer_test.cpp b/src/mongo/db/fts/stemmer_test.cpp index 42c67d7f97b..be09fe34b8c 100644 --- a/src/mongo/db/fts/stemmer_test.cpp +++ b/src/mongo/db/fts/stemmer_test.cpp @@ -47,5 +47,5 @@ TEST(English, Caps) { ASSERT_EQUALS("unit", s.stem("united")); ASSERT_EQUALS("Unite", s.stem("United")); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/stop_words.cpp b/src/mongo/db/fts/stop_words.cpp index 48db6836736..39be67707bc 100644 --- a/src/mongo/db/fts/stop_words.cpp +++ b/src/mongo/db/fts/stop_words.cpp @@ -44,7 +44,7 @@ void loadStopWordMap(StringMap<std::set<std::string>>* m); namespace { StringMap<std::shared_ptr<StopWords>> StopWordsMap; StopWords empty; -} +} // namespace StopWords::StopWords() {} @@ -70,5 +70,5 @@ MONGO_INITIALIZER(StopWords)(InitializerContext* context) { } return Status::OK(); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/stop_words.h b/src/mongo/db/fts/stop_words.h index 22835300226..6c1c1cc07e1 100644 --- a/src/mongo/db/fts/stop_words.h +++ b/src/mongo/db/fts/stop_words.h @@ -61,5 +61,5 @@ public: private: StringMap<bool> _words; // Used as a set. The values have no meaning. }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/stop_words_test.cpp b/src/mongo/db/fts/stop_words_test.cpp index 96b1e941d3b..f0fb8ec37b8 100644 --- a/src/mongo/db/fts/stop_words_test.cpp +++ b/src/mongo/db/fts/stop_words_test.cpp @@ -41,5 +41,5 @@ TEST(English, Basic1) { ASSERT(englishStopWords->isStopWord("the")); ASSERT(!englishStopWords->isStopWord("computer")); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/tokenizer.cpp b/src/mongo/db/fts/tokenizer.cpp index 3de9eb00689..1463dc212bf 100644 --- a/src/mongo/db/fts/tokenizer.cpp +++ b/src/mongo/db/fts/tokenizer.cpp @@ -132,5 +132,5 @@ Token::Type Tokenizer::_type(char c) const { return Token::TEXT; } } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/tokenizer.h b/src/mongo/db/fts/tokenizer.h index 1a0e79d9425..426449724e8 100644 --- a/src/mongo/db/fts/tokenizer.h +++ b/src/mongo/db/fts/tokenizer.h @@ -70,5 +70,5 @@ private: const StringData _raw; bool _english; }; -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/tokenizer_test.cpp b/src/mongo/db/fts/tokenizer_test.cpp index 9f09736587a..db61f3abc7d 100644 --- a/src/mongo/db/fts/tokenizer_test.cpp +++ b/src/mongo/db/fts/tokenizer_test.cpp @@ -117,5 +117,5 @@ TEST(Tokenizer, Quote1French) { ASSERT_EQUALS("s", b.data.toString()); ASSERT_EQUALS("car", c.data.toString()); } -} -} +} // namespace fts +} // namespace mongo diff --git a/src/mongo/db/fts/unicode/string.cpp b/src/mongo/db/fts/unicode/string.cpp index 201c3539d61..8b97a671d92 100644 --- a/src/mongo/db/fts/unicode/string.cpp +++ b/src/mongo/db/fts/unicode/string.cpp @@ -61,7 +61,7 @@ inline void appendUtf8Codepoint(char32_t codepoint, OutputIterator* outputIt) { *(*outputIt)++ = (((codepoint >> (6 * 0)) & 0x3f) | 0x80); } } -} +} // namespace using linenoise_utf8::copyString32to8; using linenoise_utf8::copyString8to32; diff --git a/src/mongo/db/fts/unicode/string_test.cpp b/src/mongo/db/fts/unicode/string_test.cpp index 2d3a386d1ec..a2943877b28 100644 --- a/src/mongo/db/fts/unicode/string_test.cpp +++ b/src/mongo/db/fts/unicode/string_test.cpp @@ -66,7 +66,7 @@ auto kCaseSensitive = String::kCaseSensitive; auto kTurkish = CaseFoldMode::kTurkish; auto kNormal = CaseFoldMode::kNormal; -} +} // namespace // Macro to preserve line numbers and arguments in error messages. |