Procházet zdrojové kódy

Single-parameter constructors should be marked explicit.

Nicolas "Pixel" Noble před 10 roky
rodič
revize
68095aab7d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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) {