Single-parameter constructors should be marked explicit.
This commit is contained in:
parent
04a1bebeb0
commit
68095aab7d
|
|
@ -59,7 +59,7 @@ using helloworld::Greeter;
|
||||||
|
|
||||||
class GreeterClient {
|
class GreeterClient {
|
||||||
public:
|
public:
|
||||||
GreeterClient(std::shared_ptr<ChannelInterface> channel)
|
explicit GreeterClient(std::shared_ptr<ChannelInterface> channel)
|
||||||
: stub_(Greeter::NewStub(channel)) {}
|
: stub_(Greeter::NewStub(channel)) {}
|
||||||
|
|
||||||
std::string SayHello(const std::string& user) {
|
std::string SayHello(const std::string& user) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue