fix: nothing interesting
This commit is contained in:
@@ -31,10 +31,10 @@ IPAddress::IPAddress(const std::string& ip)
|
||||
|
||||
std::smatch match = *begin;
|
||||
|
||||
int octet1 = atoi(std::string(match[1]).c_str());
|
||||
int octet2 = atoi(std::string(match[2]).c_str());
|
||||
int octet3 = atoi(std::string(match[3]).c_str());
|
||||
int octet4 = atoi(std::string(match[4]).c_str());
|
||||
std::uint8_t octet1 = std::stoul(std::string(match[1]));
|
||||
std::uint8_t octet2 = std::stoul(std::string(match[2]));
|
||||
std::uint8_t octet3 = std::stoul(std::string(match[3]));
|
||||
std::uint8_t octet4 = std::stoul(std::string(match[4]));
|
||||
|
||||
m_Address = (octet1 << 24) | (octet2 << 16) | (octet3 << 8) | octet4;
|
||||
m_Valid = true;
|
||||
@@ -50,10 +50,10 @@ IPAddress::IPAddress(const std::wstring& ip)
|
||||
|
||||
std::wsmatch match = *begin;
|
||||
|
||||
int octet1 = std::stoi(match[1]);
|
||||
int octet2 = std::stoi(match[2]);
|
||||
int octet3 = std::stoi(match[3]);
|
||||
int octet4 = std::stoi(match[4]);
|
||||
std::uint8_t octet1 = std::stoul(match[1]);
|
||||
std::uint8_t octet2 = std::stoul(match[2]);
|
||||
std::uint8_t octet3 = std::stoul(match[3]);
|
||||
std::uint8_t octet4 = std::stoul(match[4]);
|
||||
|
||||
m_Address = (octet1 << 24) | (octet2 << 16) | (octet3 << 8) | octet4;
|
||||
m_Valid = true;
|
||||
|
||||
Reference in New Issue
Block a user