diff options
author | Benety Goh <benety@mongodb.com> | 2020-09-05 08:22:46 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-05 12:40:19 +0000 |
commit | 5b29d1cbb2df9e486a55d1a87aece81c7b5a9780 (patch) | |
tree | 9b06439296d5f187ddbb3bd8baf57a0cee18b10b | |
parent | 8a86a51758f4913fd21f01408a402e5a6f787ea5 (diff) | |
download | mongo-5b29d1cbb2df9e486a55d1a87aece81c7b5a9780.tar.gz |
SERVER-50275 fix use-after-move
-rw-r--r-- | src/mongo/db/update/v2_log_builder_test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/update/v2_log_builder_test.cpp b/src/mongo/db/update/v2_log_builder_test.cpp index 37e82f48061..325c00dc573 100644 --- a/src/mongo/db/update/v2_log_builder_test.cpp +++ b/src/mongo/db/update/v2_log_builder_test.cpp @@ -63,10 +63,9 @@ RuntimeUpdatePath makeRuntimeUpdatePathAssumeNumericComponentsAreIndexes(StringD */ RuntimeUpdatePath makeRuntimeUpdatePathAssumeAllComponentsFieldNames(std::string path) { FieldRef fieldRef(path); - return RuntimeUpdatePath( - std::move(fieldRef), - std::vector<RuntimeUpdatePath::ComponentType>( - fieldRef.numParts(), RuntimeUpdatePath::ComponentType::kFieldName)); + RuntimeUpdatePath::ComponentTypeVector types(fieldRef.numParts(), + RuntimeUpdatePath::ComponentType::kFieldName); + return RuntimeUpdatePath(std::move(fieldRef), std::move(types)); } TEST(V2LogBuilder, UpdateFieldWithTopLevelMutableBsonElement) { |