Commit a10b68f0 authored by knowledge4igor's avatar knowledge4igor

Add explicit cast to fix compiler warning

parent 48f95536
...@@ -119,7 +119,7 @@ Address::init(const std::string& addr) { ...@@ -119,7 +119,7 @@ Address::init(const std::string& addr) {
long port = strtol(portPart.c_str(), &end, 10); long port = strtol(portPart.c_str(), &end, 10);
if (*end != 0 || port < Port::min() || port > Port::max()) if (*end != 0 || port < Port::min() || port > Port::max())
throw std::invalid_argument("Invalid port"); throw std::invalid_argument("Invalid port");
port_ = port; port_ = static_cast<uint16_t>(port);
} }
Error::Error(const char* message) Error::Error(const char* message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment