diff options
author | 2016-11-15 15:42:37 -0800 | |
---|---|---|
committer | 2016-11-15 15:42:37 -0800 | |
commit | 0133a1b902e4e308006502d030f6674449f94c54 (patch) | |
tree | 9a8886c1ab8ecba1b6fe466e44a0560fcb9938c3 /test/cpp/grpclb | |
parent | 850cbaaac4075d56d76a1d67dafd9f90e5284942 (diff) |
No more gcc 4.4!
Diffstat (limited to 'test/cpp/grpclb')
-rw-r--r-- | test/cpp/grpclb/grpclb_test.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 217e3375d5..e5bf18991b 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -156,11 +156,7 @@ static grpc_slice build_response_payload_slice( server->set_port(ports[i]); // Missing tokens are acceptable. Test that path. if (strlen(token_prefix) > 0) { - // The following long long int cast is meant to work around the - // disfunctional implementation of std::to_string in gcc 4.4, which - // doesn't have a version for int but does have one for long long int. - string token_data = - token_prefix + std::to_string((long long int)ports[i]); + string token_data = token_prefix + std::to_string(ports[i]); server->set_load_balance_token(token_data); } } @@ -345,14 +341,10 @@ static void start_backend_server(server_fixture *sf) { return; } GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); - - // The following long long int cast is meant to work around the - // disfunctional implementation of std::to_string in gcc 4.4, which doesn't - // have a version for int but does have one for long long int. const string expected_token = strlen(sf->lb_token_prefix) == 0 ? "" - : sf->lb_token_prefix + std::to_string((long long int)sf->port); + : sf->lb_token_prefix + std::to_string(sf->port); GPR_ASSERT(contains_metadata(&request_metadata_recv, "lb-token", expected_token.c_str())); |