diff options
author | vjpai <vpai@google.com> | 2015-05-04 09:24:08 -0700 |
---|---|---|
committer | vjpai <vpai@google.com> | 2015-05-04 09:24:08 -0700 |
commit | 041998d9862654a2b60ae8e3e62831b9371e3c95 (patch) | |
tree | f175b02711825ab0d28246229e4bd9c060e98c5e | |
parent | 3b2e2f77ff90d22f5e2e58b29edf313af2bdd2f7 (diff) |
Change function-pointer to std::function
-rw-r--r-- | test/cpp/qps/client_async.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 1b039b3dc1..0aec1b1a57 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -133,8 +133,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { class AsyncClient : public Client { public: explicit AsyncClient(const ClientConfig& config, - void (*setup_ctx)(CompletionQueue*, TestService::Stub*, - const SimpleRequest&)) : + std::function<void(CompletionQueue*, TestService::Stub*, + const SimpleRequest&)> setup_ctx) : Client(config) { for (int i = 0; i < config.async_client_threads(); i++) { cli_cqs_.emplace_back(new CompletionQueue); @@ -145,7 +145,7 @@ class AsyncClient : public Client { channel++) { auto* cq = cli_cqs_[t].get(); t = (t + 1) % cli_cqs_.size(); - (*setup_ctx)(cq, channel->get_stub(), request_); + setup_ctx(cq, channel->get_stub(), request_); } } } |