summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan Gu <juan.gu@mongodb.com>2022-08-19 20:30:18 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-19 21:28:53 +0000
commit50ce932ad0e2542e9238d968d3f7ce1a163f5b42 (patch)
tree934a1db2a509590ec05d1887d5d16841160ca96e /src
parentbd3a4efde0c07c5760111607d268383a83a6bce4 (diff)
downloadmongo-50ce932ad0e2542e9238d968d3f7ce1a163f5b42.tar.gz
SERVER-68830 did some tidy clang fixes
Diffstat (limited to 'src')
-rw-r--r--src/mongo/base/clonable_ptr_test.cpp7
-rw-r--r--src/mongo/bson/bsonobjbuilder.cpp2
-rw-r--r--src/mongo/db/concurrency/fast_map_noalloc_test.cpp14
-rw-r--r--src/mongo/unittest/golden_test.cpp1
-rw-r--r--src/mongo/unittest/golden_test_base.cpp1
5 files changed, 8 insertions, 17 deletions
diff --git a/src/mongo/base/clonable_ptr_test.cpp b/src/mongo/base/clonable_ptr_test.cpp
index 4c4bfff3d35..62dd8c5e9c0 100644
--- a/src/mongo/base/clonable_ptr_test.cpp
+++ b/src/mongo/base/clonable_ptr_test.cpp
@@ -35,7 +35,6 @@
#include "mongo/unittest/unittest.h"
-#include <boost/lexical_cast.hpp>
namespace {
@@ -144,8 +143,8 @@ public:
static CloningFunctionType getCloningFunction() {
return [calls = 0](const FunctorWithDynamicStateClonable& c) mutable {
- return std::make_unique<FunctorWithDynamicStateClonable>(
- c.data + boost::lexical_cast<std::string>(++calls));
+ return std::make_unique<FunctorWithDynamicStateClonable>(c.data +
+ std::to_string(++calls));
};
}
};
@@ -933,7 +932,7 @@ public:
void consumeText(const std::string&) override {}
std::string produceText() override {
- return root + boost::lexical_cast<std::string>(++generation);
+ return root + std::to_string(++generation);
}
};
diff --git a/src/mongo/bson/bsonobjbuilder.cpp b/src/mongo/bson/bsonobjbuilder.cpp
index 953a95687ea..859b5c8b5a7 100644
--- a/src/mongo/bson/bsonobjbuilder.cpp
+++ b/src/mongo/bson/bsonobjbuilder.cpp
@@ -30,8 +30,6 @@
#include "mongo/db/jsobj.h"
-#include <boost/lexical_cast.hpp>
-
#include "mongo/bson/timestamp.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/concurrency/fast_map_noalloc_test.cpp b/src/mongo/db/concurrency/fast_map_noalloc_test.cpp
index 7cd80e9c510..3357b560815 100644
--- a/src/mongo/db/concurrency/fast_map_noalloc_test.cpp
+++ b/src/mongo/db/concurrency/fast_map_noalloc_test.cpp
@@ -27,7 +27,6 @@
* it in the license file.
*/
-#include <boost/lexical_cast.hpp>
#include <string>
#include "mongo/db/concurrency/fast_map_noalloc.h"
@@ -95,8 +94,7 @@ TEST(FastMapNoAlloc, FindAndRemove) {
TestFastMapNoAlloc map;
for (int i = 0; i < 6; i++) {
- map.insert(ResourceId(RESOURCE_COLLECTION, i))
- ->initNew(i, "Item" + boost::lexical_cast<std::string>(i));
+ map.insert(ResourceId(RESOURCE_COLLECTION, i))->initNew(i, "Item" + std::to_string(i));
}
for (int i = 0; i < 6; i++) {
@@ -104,7 +102,7 @@ TEST(FastMapNoAlloc, FindAndRemove) {
ASSERT_EQUALS(i, map.find(ResourceId(RESOURCE_COLLECTION, i))->id);
- ASSERT_EQUALS("Item" + boost::lexical_cast<std::string>(i),
+ ASSERT_EQUALS("Item" + std::to_string(i),
map.find(ResourceId(RESOURCE_COLLECTION, i))->value);
}
@@ -138,17 +136,15 @@ TEST(FastMapNoAlloc, RemoveAll) {
stdx::unordered_map<ResourceId, TestStruct> checkMap;
for (int i = 1; i <= 6; i++) {
- map.insert(ResourceId(RESOURCE_COLLECTION, i))
- ->initNew(i, "Item" + boost::lexical_cast<std::string>(i));
+ map.insert(ResourceId(RESOURCE_COLLECTION, i))->initNew(i, "Item" + std::to_string(i));
- checkMap[ResourceId(RESOURCE_COLLECTION, i)].initNew(
- i, "Item" + boost::lexical_cast<std::string>(i));
+ checkMap[ResourceId(RESOURCE_COLLECTION, i)].initNew(i, "Item" + std::to_string(i));
}
TestFastMapNoAlloc::Iterator it = map.begin();
while (!it.finished()) {
ASSERT_EQUALS(it->id, checkMap[it.key()].id);
- ASSERT_EQUALS("Item" + boost::lexical_cast<std::string>(it->id), checkMap[it.key()].value);
+ ASSERT_EQUALS("Item" + std::to_string(it->id), checkMap[it.key()].value);
checkMap.erase(it.key());
it.remove();
diff --git a/src/mongo/unittest/golden_test.cpp b/src/mongo/unittest/golden_test.cpp
index d6c5692d72f..aedffcf279e 100644
--- a/src/mongo/unittest/golden_test.cpp
+++ b/src/mongo/unittest/golden_test.cpp
@@ -33,7 +33,6 @@
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/stream_buffer.hpp>
-#include <boost/lexical_cast.hpp>
#include <boost/program_options.hpp>
#include <fmt/format.h>
#include <fmt/ostream.h>
diff --git a/src/mongo/unittest/golden_test_base.cpp b/src/mongo/unittest/golden_test_base.cpp
index 0a2ae8eee9b..67b1ee62077 100644
--- a/src/mongo/unittest/golden_test_base.cpp
+++ b/src/mongo/unittest/golden_test_base.cpp
@@ -32,7 +32,6 @@
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/stream_buffer.hpp>
-#include <boost/lexical_cast.hpp>
#include <boost/optional/optional_io.hpp>
#include <boost/program_options.hpp>
#include <fmt/format.h>