nghttpx: Cast to double to fix build with gcc 4.8 on Solaris 11

This commit is contained in:
Tatsuhiro Tsujikawa 2016-06-27 22:33:25 +09:00
parent 903e0077aa
commit 179561e4be
2 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,8 @@ void ConnectBlocker::on_failure() {
++fail_count_;
auto base_backoff = pow(MULTIPLIER, std::min(MAX_BACKOFF_EXP, fail_count_));
auto base_backoff = pow(
MULTIPLIER, static_cast<double>(std::min(MAX_BACKOFF_EXP, fail_count_)));
auto dist = std::uniform_real_distribution<>(-JITTER * base_backoff,
JITTER * base_backoff);

View File

@ -157,7 +157,8 @@ constexpr auto JITTER = 0.2;
} // namespace
void LiveCheck::schedule() {
auto base_backoff = pow(MULTIPLIER, std::min(fail_count_, MAX_BACKOFF_EXP));
auto base_backoff = pow(
MULTIPLIER, static_cast<double>(std::min(fail_count_, MAX_BACKOFF_EXP)));
auto dist = std::uniform_real_distribution<>(-JITTER * base_backoff,
JITTER * base_backoff);