소스 검색

Single-parameter constructors should be marked explicit.

Nicolas "Pixel" Noble 10 년 전
부모
커밋
68095aab7d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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) {