summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/query/optimizer/utils/unit_test_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/query/optimizer/utils/unit_test_utils.cpp b/src/mongo/db/query/optimizer/utils/unit_test_utils.cpp
index c060535acf6..c857f6fd355 100644
--- a/src/mongo/db/query/optimizer/utils/unit_test_utils.cpp
+++ b/src/mongo/db/query/optimizer/utils/unit_test_utils.cpp
@@ -203,7 +203,7 @@ void serializeMetadata(std::ostream& stream, Metadata metadata) {
// The ScanDefinitions are stored in an unordered map, and the order of the ScanDefinitions in
// the golden file must be the same every time the test is run.
std::map<std::string, ScanDefinition> orderedScanDefs;
- for (auto element : metadata._scanDefs) {
+ for (const auto& element : metadata._scanDefs) {
orderedScanDefs.insert(element);
}