diff options
author | Craig Tiller <ctiller@google.com> | 2015-03-02 09:08:05 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-03-02 09:08:05 -0800 |
commit | 1a43f87134c1978bc4f1fbf64fa1b60e13552d64 (patch) | |
tree | 13e163d8e17731433c7f4c0c12123a86b4caa878 /src/cpp/client | |
parent | 61691f92c37f48cb194754aafefbf1e6462fa3c7 (diff) |
De-C++11-ification
Diffstat (limited to 'src/cpp/client')
-rw-r--r-- | src/cpp/client/insecure_credentials.cc | 9 | ||||
-rw-r--r-- | src/cpp/client/secure_credentials.cc | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 8180d1e60e..2dcfe69591 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -37,18 +37,21 @@ #include <grpc/support/log.h> #include <grpc++/channel_arguments.h> +#include <grpc++/config.h> #include <grpc++/credentials.h> #include "src/cpp/client/channel.h" namespace grpc { namespace { -class InsecureCredentialsImpl final : public Credentials { +class InsecureCredentialsImpl GRPC_FINAL : public Credentials { public: - std::shared_ptr<grpc::ChannelInterface> CreateChannel(const string& target, const grpc::ChannelArguments& args) override { + std::shared_ptr<grpc::ChannelInterface> CreateChannel( + const string& target, const grpc::ChannelArguments& args) GRPC_OVERRIDE { grpc_channel_args channel_args; args.SetChannelArgs(&channel_args); - return std::shared_ptr<ChannelInterface>(new Channel(target, grpc_channel_create(target.c_str(), &channel_args))); + return std::shared_ptr<ChannelInterface>(new Channel( + target, grpc_channel_create(target.c_str(), &channel_args))); } SecureCredentials* AsSecureCredentials() { return nullptr; } diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 175f88f6a9..5eb5c54794 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -37,19 +37,20 @@ #include <grpc/support/log.h> #include <grpc++/channel_arguments.h> +#include <grpc++/config.h> #include <grpc++/credentials.h> #include "src/cpp/client/channel.h" namespace grpc { -class SecureCredentials final : public Credentials { +class SecureCredentials GRPC_FINAL : public Credentials { public: explicit SecureCredentials(grpc_credentials* c_creds) : c_creds_(c_creds) {} - ~SecureCredentials() override { grpc_credentials_release(c_creds_); } + ~SecureCredentials() GRPC_OVERRIDE { grpc_credentials_release(c_creds_); } grpc_credentials* GetRawCreds() { return c_creds_; } std::shared_ptr<grpc::ChannelInterface> CreateChannel( - const string& target, const grpc::ChannelArguments& args) override { + const string& target, const grpc::ChannelArguments& args) GRPC_OVERRIDE { grpc_channel_args channel_args; args.SetChannelArgs(&channel_args); return std::shared_ptr<ChannelInterface>(new Channel( @@ -57,9 +58,7 @@ class SecureCredentials final : public Credentials { grpc_secure_channel_create(c_creds_, target.c_str(), &channel_args))); } - SecureCredentials* AsSecureCredentials() { - return this; - } + SecureCredentials* AsSecureCredentials() { return this; } private: grpc_credentials* const c_creds_; |