aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/server_async.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-03-05 09:58:05 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-03-05 16:35:10 -0800
commit7fed69b7ad10a06c2eedaaf0279f44f2bab0d85c (patch)
treecab05136a7422d5ce317fe7e7aa4f959f7e9f125 /test/cpp/qps/server_async.cc
parent673439d5bd2d1711c10e8c4d29ceee3e67d585fd (diff)
Use static_cast rather than reinterpret_cast whenever possible
Diffstat (limited to 'test/cpp/qps/server_async.cc')
-rw-r--r--test/cpp/qps/server_async.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index b88b88445c..f1dfea24d8 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -240,11 +240,9 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
private:
std::mutex mu_;
};
- static void* tag(ServerRpcContext* func) {
- return reinterpret_cast<void*>(func);
- }
+ static void* tag(ServerRpcContext* func) { return static_cast<void*>(func); }
static ServerRpcContext* detag(void* tag) {
- return reinterpret_cast<ServerRpcContext*>(tag);
+ return static_cast<ServerRpcContext*>(tag);
}
class ServerRpcContextUnaryImpl final : public ServerRpcContext {