diff options
| author | Trevor Guidry <trevor.guidry@mongodb.com> | 2022-09-16 19:00:42 +0000 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-20 18:00:27 +0000 |
| commit | bc998019c79c83db140317c3e59761fdd12a8c5f (patch) | |
| tree | 2d6ce6aafdf155f07fd403c9fff7454c86a8f09f /src/mongo/db/storage/key_string_test.cpp | |
| parent | 03bf5f2dff26f3d5c3ca4687c565c3c764bcc013 (diff) | |
| download | mongo-bc998019c79c83db140317c3e59761fdd12a8c5f.tar.gz | |
SERVER-69581 add performance-for-range-copy check to clang-tidy
Diffstat (limited to 'src/mongo/db/storage/key_string_test.cpp')
| -rw-r--r-- | src/mongo/db/storage/key_string_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp index 733e527243f..d1ae1b3cda3 100644 --- a/src/mongo/db/storage/key_string_test.cpp +++ b/src/mongo/db/storage/key_string_test.cpp @@ -1847,7 +1847,7 @@ TEST_F(KeyStringBuilderTest, RandomizedInputsForToBsonSafe) { std::numeric_limits<unsigned int>::max()); const auto interestingElements = getInterestingElements(KeyString::Version::V1); - for (auto elem : interestingElements) { + for (const auto& elem : interestingElements) { const KeyString::Builder ks(KeyString::Version::V1, elem, ALL_ASCENDING); auto ksBuffer = SharedBuffer::allocate(ks.getSize()); @@ -1908,7 +1908,7 @@ void perfTest(KeyString::Version version, const Numbers& numbers) { Timer t; for (uint64_t i = 0; i < iters; i++) - for (auto item : numbers) { + for (const auto& item : numbers) { // Assuming there are sufficient invariants in the to/from KeyString::Builder // methods // that calls will not be optimized away. |
