Browse Source

Merge pull request #189 from nicolasnoble/lint-roller

Single-parameter constructors should be marked explicit.
David Klempner 10 năm trước cách đây
mục cha
commit
4305860d21
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      cpp/helloworld/greeter_async_client.cc

+ 1 - 1
cpp/helloworld/greeter_async_client.cc

@@ -59,7 +59,7 @@ using helloworld::Greeter;
 
 class GreeterClient {
  public:
-  GreeterClient(std::shared_ptr<ChannelInterface> channel)
+  explicit GreeterClient(std::shared_ptr<ChannelInterface> channel)
       : stub_(Greeter::NewStub(channel)) {}
 
   std::string SayHello(const std::string& user) {