From 1a43f87134c1978bc4f1fbf64fa1b60e13552d64 Mon Sep 17 00:00:00 2001 From: Craig Tiller <ctiller@google.com> Date: Mon, 2 Mar 2015 09:08:05 -0800 Subject: [PATCH] De-C++11-ification --- src/cpp/client/insecure_credentials.cc | 9 ++++++--- 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_; -- GitLab