summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/document_diff_applier.cpp
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-18 17:02:53 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-18 17:02:53 -0300
commit959575a5ca598bf5f37fb5cebe7ed1d80d3d71f7 (patch)
treeacc8d60aedb12b70048e676e8a7349deb0010db8 /src/mongo/db/update/document_diff_applier.cpp
parent76588293975fc059cf076779e4283e6ffaf8afff (diff)
New upstream version 6.0.20upstream
Diffstat (limited to 'src/mongo/db/update/document_diff_applier.cpp')
-rw-r--r--src/mongo/db/update/document_diff_applier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/update/document_diff_applier.cpp b/src/mongo/db/update/document_diff_applier.cpp
index ec592ef3363..7620a756064 100644
--- a/src/mongo/db/update/document_diff_applier.cpp
+++ b/src/mongo/db/update/document_diff_applier.cpp
@@ -455,7 +455,7 @@ int32_t computeDamageOnArray(const BSONObj& preImageRoot,
nextMod = reader->next();
} else {
// This field is not mentioned in the diff so we pad the post image with null.
- auto idxAsStr = std::to_string(idx);
+ const auto idxAsStr = std::to_string(idx);
// The end of 'arrayPreImage' with the offset from the updates made already.
auto targetOffset = targetOffsetInPostImage(
arrayPreImage.end()->rawdata(), preImageRoot.objdata(), offsetRoot, diffSize);
@@ -464,7 +464,7 @@ int32_t computeDamageOnArray(const BSONObj& preImageRoot,
appendDamage(damages, bufBuilder->len(), sourceSize, targetOffset, 0);
diffSize += sourceSize;
appendTypeByte(bufBuilder, BSONType::jstNULL);
- bufBuilder->appendStr(idxAsStr);
+ bufBuilder->appendCStr(idxAsStr);
}
}