diff options
author | Andrew Morrow <acm@10gen.com> | 2013-07-19 17:22:54 -0400 |
---|---|---|
committer | Andrew Morrow <acm@10gen.com> | 2013-07-22 14:03:04 -0400 |
commit | 4e2b1743b1366a5c6f943dbb40df2d19ac190da5 (patch) | |
tree | 4b564a1f4efd2521e4e2fc3e75c2ba2acaa8da31 /src/mongo/db/ops/modifier_push.cpp | |
parent | f33b633a7110d60a54626f17421c283e90a47c2f (diff) | |
download | mongo-4e2b1743b1366a5c6f943dbb40df2d19ac190da5.tar.gz |
SERVER-10275 Use size_t in pathsupport function
Diffstat (limited to 'src/mongo/db/ops/modifier_push.cpp')
-rw-r--r-- | src/mongo/db/ops/modifier_push.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/ops/modifier_push.cpp b/src/mongo/db/ops/modifier_push.cpp index 875ea260f87..774e1e40720 100644 --- a/src/mongo/db/ops/modifier_push.cpp +++ b/src/mongo/db/ops/modifier_push.cpp @@ -158,7 +158,7 @@ namespace mongo { mutablebson::Document& doc; // Index in _fieldRef for which an Element exist in the document. - int32_t idxFound; + size_t idxFound; // Element corresponding to _fieldRef[0.._idxFound]. mutablebson::Element elemFound; @@ -378,8 +378,7 @@ namespace mongo { } else if (status.isOK()) { - const bool destExists = (_preparedState->idxFound == - static_cast<int32_t>(_fieldRef.numParts()-1)); + const bool destExists = (_preparedState->idxFound == (_fieldRef.numParts()-1)); // If the path exists, we require the target field to be already an // array. if (destExists && _preparedState->elemFound.getType() != Array) { @@ -430,7 +429,7 @@ namespace mongo { // 1. If the array field is not there, create it as an array and attach it to the // document. if (!_preparedState->elemFound.ok() || - _preparedState->idxFound < static_cast<int32_t>(_fieldRef.numParts()-1)) { + _preparedState->idxFound < (_fieldRef.numParts()-1)) { // Creates the array element mutablebson::Document& doc = _preparedState->doc; |