Skip to content

Commit 0dd1eca

Browse files
committed
src: set port in node_options to uint16_t
1 parent b5da2f4 commit 0dd1eca

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/node_options.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ 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
}
@@ -45,7 +44,7 @@ class HostPort {
4544

4645
private:
4746
std::string host_name_;
48-
int port_;
47+
uint16_t port_;
4948
};
5049

5150
class Options {

0 commit comments

Comments
 (0)