Skip to content

Commit b32cdfc

Browse files
jameswahlinevergreen
authored andcommitted
SERVER-42815 Remove unused BSONElement::codeWScopeScopeDataUnsafe() method
1 parent 1b80832 commit b32cdfc

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/mongo/bson/bsonelement.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -467,23 +467,7 @@ class BSONElement {
467467
return ConstDataView(value() + 4).read<LittleEndian<int>>();
468468
}
469469

470-
/** Get the scope SavedContext of a CodeWScope data element.
471-
*
472-
* This function is DEPRECATED, since it can error if there are
473-
* null chars in the codeWScopeCode. However, some existing indexes
474-
* may be based on an incorrect ordering derived from this function,
475-
* so it may still need to be used in certain cases.
476-
* */
477-
const char* codeWScopeScopeDataUnsafe() const {
478-
// This can error if there are null chars in the codeWScopeCode
479-
return codeWScopeCode() + strlen(codeWScopeCode()) + 1;
480-
}
481-
482470
/* Get the scope SavedContext of a CodeWScope data element.
483-
*
484-
* This is the corrected version of codeWScopeScopeDataUnsafe(),
485-
* but note that existing uses might rely on the behavior of
486-
* that function so be careful in choosing which version to use.
487471
*/
488472
const char* codeWScopeScopeData() const {
489473
return codeWScopeCode() + codeWScopeCodeLen();

0 commit comments

Comments
 (0)