File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -28,24 +28,23 @@ class HostPort {
2828
2929 void set_host (const std::string& host) { host_name_ = host; }
3030
31- void set_port (int port) { port_ = port; }
31+ void set_port (uint16_t port) { port_ = port; }
3232
3333 const std::string& host () const { return host_name_; }
3434
35- int port () const {
36- // TODO(joyeecheung): make port a uint16_t
35+ uint16_t port () const {
3736 CHECK_GE (port_, 0 );
3837 return port_;
3938 }
4039
4140 void Update (const HostPort& other) {
4241 if (!other.host_name_ .empty ()) host_name_ = other.host_name_ ;
43- if (other. port_ >= 0 ) port_ = other.port_ ;
42+ port_ = other.port_ ;
4443 }
4544
4645 private:
4746 std::string host_name_;
48- int port_;
47+ uint16_t port_;
4948};
5049
5150class Options {
You can’t perform that action at this time.
0 commit comments