summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/validate_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/validate_state.cpp')
-rw-r--r--src/mongo/db/catalog/validate_state.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/validate_state.cpp b/src/mongo/db/catalog/validate_state.cpp
index 3b6995cad82..7d0bd1e0463 100644
--- a/src/mongo/db/catalog/validate_state.cpp
+++ b/src/mongo/db/catalog/validate_state.cpp
@@ -278,8 +278,8 @@ void ValidateState::initializeCursors(OperationContext* opCtx) {
// use cursor->next() to get subsequent Records. However, if the Record Store is empty,
// there is no first record. In this case, we set the first Record Id to an invalid RecordId
// (RecordId()), which will halt iteration at the initialization step.
- const boost::optional<Record> record = _traverseRecordStoreCursor->next(opCtx);
- _firstRecordId = record ? record->id : RecordId();
+ auto record = _traverseRecordStoreCursor->next(opCtx);
+ _firstRecordId = record ? std::move(record->id) : RecordId();
}
void ValidateState::_relockDatabaseAndCollection(OperationContext* opCtx) {