mirror of https://gitee.com/bigwinds/arangodb
fix VS warnings
This commit is contained in:
parent
8002607b67
commit
eea20e5fa2
|
@ -106,7 +106,7 @@ bool Constituent::waitForSync() const {
|
|||
|
||||
/// Random sleep times in election process
|
||||
duration_t Constituent::sleepFor(double min_t, double max_t) {
|
||||
int32_t left = 1000*min_t, right = 1000*max_t;
|
||||
int32_t left = static_cast<int32_t>(1000.0 * min_t), right = static_cast<int32_t>(1000.0 * max_t);
|
||||
return duration_t(
|
||||
static_cast<long>(RandomGenerator::interval(left, right)));
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ void Constituent::run() {
|
|||
_cast = false; // New round set not cast vote
|
||||
}
|
||||
|
||||
int32_t left = 1000000*config().minPing, right = 1000000*config().maxPing;
|
||||
int32_t left = static_cast<int32_t>(1000000.0 * config().minPing), right = static_cast<int32_t>(1000000.0 * config().maxPing);
|
||||
long rand_wait = static_cast<long>(RandomGenerator::interval(left, right));
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue