diff options
author | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:16:55 -0800 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:16:55 -0800 |
commit | be82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch) | |
tree | cc5e1234073eb250a2c319b5a4db2919fce060ea /test/core/backoff | |
parent | 194436342137924b4fb7429bede037a4b5ec7edb (diff) |
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/backoff')
-rw-r--r-- | test/core/backoff/backoff_test.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/core/backoff/backoff_test.cc b/test/core/backoff/backoff_test.cc index 53e910eddd..35a3b1459f 100644 --- a/test/core/backoff/backoff_test.cc +++ b/test/core/backoff/backoff_test.cc @@ -144,9 +144,9 @@ TEST(BackOffTest, JitterBackOff) { EXPECT_EQ(next - grpc_core::ExecCtx::Get()->Now(), initial_backoff); grpc_millis expected_next_lower_bound = - (grpc_millis)((double)current_backoff * (1 - jitter)); + static_cast<grpc_millis>(static_cast<double>(current_backoff) * (1 - jitter)); grpc_millis expected_next_upper_bound = - (grpc_millis)((double)current_backoff * (1 + jitter)); + static_cast<grpc_millis>(static_cast<double>(current_backoff) * (1 + jitter)); for (int i = 0; i < 10000; i++) { next = backoff.NextAttemptTime(); @@ -156,11 +156,11 @@ TEST(BackOffTest, JitterBackOff) { EXPECT_GE(timeout_millis, expected_next_lower_bound); EXPECT_LE(timeout_millis, expected_next_upper_bound); current_backoff = std::min( - (grpc_millis)((double)current_backoff * multiplier), max_backoff); + static_cast<grpc_millis>(static_cast<double>(current_backoff) * multiplier), max_backoff); expected_next_lower_bound = - (grpc_millis)((double)current_backoff * (1 - jitter)); + static_cast<grpc_millis>(static_cast<double>(current_backoff) * (1 - jitter)); expected_next_upper_bound = - (grpc_millis)((double)current_backoff * (1 + jitter)); + static_cast<grpc_millis>(static_cast<double>(current_backoff) * (1 + jitter)); } } |