summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/modifier_push.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-07-19 17:22:54 -0400
committerAndrew Morrow <acm@10gen.com>2013-07-22 14:03:04 -0400
commit4e2b1743b1366a5c6f943dbb40df2d19ac190da5 (patch)
tree4b564a1f4efd2521e4e2fc3e75c2ba2acaa8da31 /src/mongo/db/ops/modifier_push.cpp
parentf33b633a7110d60a54626f17421c283e90a47c2f (diff)
downloadmongo-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.cpp7
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;