summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Gu <juan.gu@mongodb.com>2022-09-01 19:52:37 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-01 21:10:51 +0000
commit83746d12c98402b88a173d35757138b59f27bc5a (patch)
treecb9fcbee6d7d3503c89ac3ad055a164426aa3351
parent8834bd03c22a3a0d21227def26d7a474dafaabc8 (diff)
downloadmongo-83746d12c98402b88a173d35757138b59f27bc5a.tar.gz
SERVER-69156 fix misc-uniqueptr-reset-release warning
-rw-r--r--.clang-tidy2
-rw-r--r--src/mongo/db/query/plan_enumerator.cpp2
-rw-r--r--src/mongo/db/query/query_planner.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 3915da863cb..e019ac6454c 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -25,6 +25,7 @@ Checks: '-*,
bugprone-undelegated-constructor,
hicpp-static-assert,
hicpp-undelegated-constructor,
+ misc-uniqueptr-reset-release,
modernize-replace-auto-ptr,
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
@@ -82,7 +83,6 @@ Checks: '-*,
-misc-static-assert,
-misc-throw-by-value-catch-by-reference,
-misc-unconventional-assign-operator,
- -misc-uniqueptr-reset-release,
-misc-unused-alias-decls,
-modernize-avoid-bind,
-modernize-use-bool-literals,
diff --git a/src/mongo/db/query/plan_enumerator.cpp b/src/mongo/db/query/plan_enumerator.cpp
index 16134503159..0eedf0e07b2 100644
--- a/src/mongo/db/query/plan_enumerator.cpp
+++ b/src/mongo/db/query/plan_enumerator.cpp
@@ -494,7 +494,7 @@ bool PlanEnumerator::prepMemo(MatchExpression* node, PrepMemoContext context) {
NodeAssignment* assign;
allocateAssignment(node, &assign, &myMemoID);
- assign->arrayAssignment.reset(aa.release());
+ assign->arrayAssignment = std::move(aa);
return true;
} else if (Indexability::nodeCanUseIndexOnOwnField(node) ||
Indexability::isBoundsGeneratingNot(node) ||
diff --git a/src/mongo/db/query/query_planner.cpp b/src/mongo/db/query/query_planner.cpp
index 4420e3f2725..f97e5a5a79e 100644
--- a/src/mongo/db/query/query_planner.cpp
+++ b/src/mongo/db/query/query_planner.cpp
@@ -685,7 +685,7 @@ StatusWith<std::unique_ptr<PlanCacheIndexTree>> QueryPlanner::cacheDataFromTagge
std::unique_ptr<IndexEntry> indexEntry =
std::make_unique<IndexEntry>(relevantIndices[itag->index]);
- indexTree->entry.reset(indexEntry.release());
+ indexTree->entry = std::move(indexEntry);
indexTree->index_pos = itag->pos;
indexTree->canCombineBounds = itag->canCombineBounds;
}