summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTad Marshall <tad@10gen.com>2011-12-24 15:25:19 -0500
committerTad Marshall <tad@10gen.com>2011-12-24 15:25:19 -0500
commitdfa4cd7e2cf109b072440155fabc08a93c8045a0 (patch)
tree0746e78833fc07b06ddeed3b1d8f906b00f5a58b
parent11944664894c29e9d1c31fcdf256d652cd7d9ce3 (diff)
downloadmongo-dfa4cd7e2cf109b072440155fabc08a93c8045a0.tar.gz
get rid of a 32-bit Windows build warning
Warning was (twice for same line): db\pipeline\expression.cpp(2612): warning C4244: 'argument' : conversion from '__int64' to 'unsigned int', possible loss of data
-rwxr-xr-xdb/pipeline/expression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/pipeline/expression.cpp b/db/pipeline/expression.cpp
index 8fb7a5fe247..b3caefcf899 100755
--- a/db/pipeline/expression.cpp
+++ b/db/pipeline/expression.cpp
@@ -2605,8 +2605,8 @@ namespace mongo {
(pLength->getType() == NumberInt
|| pLength->getType() == NumberLong
|| pLength->getType() == NumberDouble));
- long long lower = pLower->coerceToLong();
- long long length = pLength->coerceToLong();
+ string::size_type lower = static_cast< string::size_type >( pLower->coerceToLong() );
+ string::size_type length = static_cast< string::size_type >( pLength->coerceToLong() );
return Value::createString( str.substr(lower, length) );
}