summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/command_mirroring_test.cpp
diff options
context:
space:
mode:
authorTrevor Guidry <trevor.guidry@mongodb.com>2022-09-16 19:00:42 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-20 18:00:27 +0000
commitbc998019c79c83db140317c3e59761fdd12a8c5f (patch)
tree2d6ce6aafdf155f07fd403c9fff7454c86a8f09f /src/mongo/db/commands/command_mirroring_test.cpp
parent03bf5f2dff26f3d5c3ca4687c565c3c764bcc013 (diff)
downloadmongo-bc998019c79c83db140317c3e59761fdd12a8c5f.tar.gz
SERVER-69581 add performance-for-range-copy check to clang-tidy
Diffstat (limited to 'src/mongo/db/commands/command_mirroring_test.cpp')
-rw-r--r--src/mongo/db/commands/command_mirroring_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/command_mirroring_test.cpp b/src/mongo/db/commands/command_mirroring_test.cpp
index 99db08a6df5..6afb28d8718 100644
--- a/src/mongo/db/commands/command_mirroring_test.cpp
+++ b/src/mongo/db/commands/command_mirroring_test.cpp
@@ -61,7 +61,7 @@ public:
bob << commandName() << coll;
bob << "lsid" << _lsid.toBSON();
- for (auto arg : args) {
+ for (const auto& arg : args) {
bob << arg.firstElement();
}
@@ -233,7 +233,7 @@ public:
void checkFieldNamesAreAllowed(BSONObj& mirroredObj) {
const auto possibleKeys = getAllowedKeys();
- for (auto key : mirroredObj.getFieldNames<std::set<std::string>>()) {
+ for (const auto& key : mirroredObj.getFieldNames<std::set<std::string>>()) {
ASSERT(std::find(possibleKeys.begin(), possibleKeys.end(), key) != possibleKeys.end());
}
}