diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-07-07 16:28:20 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-07-07 16:28:20 -0700 |
commit | d9b6fcfee4cb986f148762a4a7d0794de9b3ba62 (patch) | |
tree | 0115646d979131d8a4721ad7ef086f2df8415001 /src | |
parent | 822d2c7bebf9810903bdc63e24dc26eb2640f756 (diff) |
Support older compilers
Diffstat (limited to 'src')
-rw-r--r-- | src/cpp/server/server_builder.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index fa158c919e..86c78f05ff 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -51,21 +51,21 @@ std::unique_ptr<ServerCompletionQueue> ServerBuilder::AddCompletionQueue() { } void ServerBuilder::RegisterService(SynchronousService* service) { - services_.emplace_back(service->service()); + services_.emplace_back(new NamedService<RpcService>(service->service())); } void ServerBuilder::RegisterAsyncService(AsynchronousService* service) { - async_services_.emplace_back(service); + async_services_.emplace_back(new NamedService<AsynchronousService>(service)); } void ServerBuilder::RegisterService( const grpc::string& addr, SynchronousService* service) { - services_.emplace_back(addr, service->service()); + services_.emplace_back(new NamedService<RpcService>(addr, service->service())); } void ServerBuilder::RegisterAsyncService( const grpc::string& addr, AsynchronousService* service) { - async_services_.emplace_back(addr, service); + async_services_.emplace_back(new NamedService<AsynchronousService>(addr, service)); } void ServerBuilder::RegisterAsyncGenericService(AsyncGenericService* service) { @@ -107,13 +107,13 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() { } for (auto service = services_.begin(); service != services_.end(); service++) { - if (!server->RegisterService(service->host.get(), service->service)) { + if (!server->RegisterService((*service)->host.get(), (*service)->service)) { return nullptr; } } for (auto service = async_services_.begin(); service != async_services_.end(); service++) { - if (!server->RegisterAsyncService(service->host.get(), service->service)) { + if (!server->RegisterAsyncService((*service)->host.get(), (*service)->service)) { return nullptr; } } |