diff options
author | Mathias Stearn <mathias@10gen.com> | 2019-04-25 10:04:28 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2019-05-01 19:14:20 -0400 |
commit | 612492b81930005104f3f565f21e9c62b08bb246 (patch) | |
tree | 0b2876eac0a85ee9a1af872544b17c0975eac912 | |
parent | d2c92c689c9a2b4957c84caf32f4bc8e6c4a6709 (diff) | |
download | mongo-612492b81930005104f3f565f21e9c62b08bb246.tar.gz |
SERVER-40802 Don't include boost/algorithm/string.hpp in mongo_uri.h
-rw-r--r-- | src/mongo/client/mongo_uri.cpp | 3 | ||||
-rw-r--r-- | src/mongo/client/mongo_uri.h | 4 | ||||
-rw-r--r-- | src/mongo/db/fts/unicode/string_test.cpp | 4 | ||||
-rw-r--r-- | src/mongo/shell/dbshell.cpp | 1 | ||||
-rw-r--r-- | src/mongo/shell/shell_utils_launcher.cpp | 1 | ||||
-rw-r--r-- | src/mongo/util/options_parser/options_parser.cpp | 1 |
6 files changed, 11 insertions, 3 deletions
diff --git a/src/mongo/client/mongo_uri.cpp b/src/mongo/client/mongo_uri.cpp index 065da5fd016..e11f9b0a06f 100644 --- a/src/mongo/client/mongo_uri.cpp +++ b/src/mongo/client/mongo_uri.cpp @@ -298,6 +298,9 @@ URIParts::URIParts(StringData uri) { } } // namespace +MongoURI::CaseInsensitiveString::CaseInsensitiveString(std::string str) + : _original(std::move(str)), _lowercase(boost::algorithm::to_lower_copy(_original)) {} + bool MongoURI::isMongoURI(StringData uri) { return (uri.startsWith(kURIPrefix) || uri.startsWith(kURISRVPrefix)); } diff --git a/src/mongo/client/mongo_uri.h b/src/mongo/client/mongo_uri.h index 0377fe35e39..89de663d138 100644 --- a/src/mongo/client/mongo_uri.h +++ b/src/mongo/client/mongo_uri.h @@ -29,7 +29,6 @@ #pragma once -#include <boost/algorithm/string.hpp> #include <map> #include <sstream> #include <string> @@ -105,8 +104,7 @@ class MongoURI { public: class CaseInsensitiveString { public: - CaseInsensitiveString(std::string str) - : _original(std::move(str)), _lowercase(boost::algorithm::to_lower_copy(_original)) {} + CaseInsensitiveString(std::string str); CaseInsensitiveString(StringData sd) : CaseInsensitiveString(std::string(sd)) {} CaseInsensitiveString(const char* str) : CaseInsensitiveString(std::string(str)) {} diff --git a/src/mongo/db/fts/unicode/string_test.cpp b/src/mongo/db/fts/unicode/string_test.cpp index c1f5ddd3069..2d3a386d1ec 100644 --- a/src/mongo/db/fts/unicode/string_test.cpp +++ b/src/mongo/db/fts/unicode/string_test.cpp @@ -27,6 +27,10 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + +#include <cctype> + #include "mongo/db/fts/unicode/string.h" #include "mongo/shell/linenoise_utf8.h" #include "mongo/unittest/unittest.h" diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp index f80ac260ec6..44d5c97d509 100644 --- a/src/mongo/shell/dbshell.cpp +++ b/src/mongo/shell/dbshell.cpp @@ -32,6 +32,7 @@ #include "mongo/platform/basic.h" #include <boost/filesystem/operations.hpp> +#include <cctype> #include <fstream> #include <iostream> #include <pcrecpp.h> diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp index 34aa7c61d7e..736232614b0 100644 --- a/src/mongo/shell/shell_utils_launcher.cpp +++ b/src/mongo/shell/shell_utils_launcher.cpp @@ -39,6 +39,7 @@ #include <boost/iostreams/stream.hpp> #include <boost/iostreams/stream_buffer.hpp> #include <boost/iostreams/tee.hpp> +#include <cctype> #include <fcntl.h> #include <iostream> #include <iterator> diff --git a/src/mongo/util/options_parser/options_parser.cpp b/src/mongo/util/options_parser/options_parser.cpp index 81f0626557b..aa382d72897 100644 --- a/src/mongo/util/options_parser/options_parser.cpp +++ b/src/mongo/util/options_parser/options_parser.cpp @@ -34,6 +34,7 @@ #include <algorithm> #include <boost/filesystem.hpp> #include <boost/program_options.hpp> +#include <cctype> #include <cerrno> #include <fstream> #include <stdio.h> |