Bladeren bron

Address review comments

Yuchen Zeng 8 jaren geleden
bovenliggende
commit
2411bacd04
2 gewijzigde bestanden met toevoegingen van 2 en 3 verwijderingen
  1. 0 2
      include/grpc++/channel.h
  2. 2 1
      src/cpp/client/channel_cc.cc

+ 0 - 2
include/grpc++/channel.h

@@ -31,9 +31,7 @@ struct grpc_channel;
 
 namespace grpc {
 class ChannelConnectivityWatcher;
-}
 
-namespace grpc {
 /// Channels represent a connection to an endpoint. Created by \a CreateChannel.
 class Channel final : public ChannelInterface,
                       public CallHook,

+ 2 - 1
src/cpp/client/channel_cc.cc

@@ -50,7 +50,7 @@ void WatchStateChange(void* arg);
 // support.
 class ChannelConnectivityWatcher {
  public:
-  ChannelConnectivityWatcher(Channel* channel)
+  explicit ChannelConnectivityWatcher(Channel* channel)
       : channel_(channel), thd_id_(0), being_destroyed_(0) {}
 
   void WatchStateChangeImpl() {
@@ -67,6 +67,7 @@ class ChannelConnectivityWatcher {
       state = channel_->GetState(false);
     }
   }
+
   void StartWatching() {
     gpr_thd_options options = gpr_thd_options_default();
     gpr_thd_options_set_joinable(&options);