Fix build on 32-bit archs.
This commit is contained in:
parent
21700363ac
commit
d94b7d4b56
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354198
2 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
--- src/mongo/db/kill_current_op.cpp.orig 2014-05-15 15:30:33.100157820 +0000
|
||||
+++ src/mongo/db/kill_current_op.cpp 2014-05-15 15:35:12.714138934 +0000
|
||||
@@ -152,7 +152,7 @@
|
||||
}
|
||||
|
||||
// Return true with (approx) probability p = "chance". Recall: 0 <= chance <= 1.
|
||||
- double next = static_cast<double>(std::abs(checkForInterruptPRNG.nextInt64()));
|
||||
+ double next = std::abs(static_cast<double>(checkForInterruptPRNG.nextInt64()));
|
||||
double upperBound =
|
||||
std::numeric_limits<int64_t>::max() * failPointInfo["chance"].numberDouble();
|
||||
if (next > upperBound) {
|
|
@ -0,0 +1,11 @@
|
|||
--- src/mongo/db/ops/modifier_push.cpp.orig 2014-05-15 15:24:21.650184430 +0000
|
||||
+++ src/mongo/db/ops/modifier_push.cpp 2014-05-15 15:25:51.014179801 +0000
|
||||
@@ -646,7 +646,7 @@
|
||||
}
|
||||
|
||||
const int64_t numChildren = mutablebson::countChildren(_preparedState->elemFound);
|
||||
- int64_t countRemoved = std::max(static_cast<int64_t>(0), numChildren - abs(_slice));
|
||||
+ int64_t countRemoved = std::max(static_cast<int64_t>(0), numChildren - (_slice >= 0 ? _slice : -_slice));
|
||||
|
||||
// If _slice is negative, remove from the bottom, otherwise from the top
|
||||
const bool removeFromEnd = (_slice > 0);
|
Loading…
Reference in a new issue