refactor: format code
This commit is contained in:
@@ -16,13 +16,13 @@ namespace network {
|
||||
|
||||
/* Create an invalid address */
|
||||
IPAddress::IPAddress() noexcept
|
||||
: m_Address(0), m_Valid(false){
|
||||
|
||||
}
|
||||
: m_Address(0), m_Valid(false) {
|
||||
|
||||
}
|
||||
|
||||
/* Initialize by string IP */
|
||||
IPAddress::IPAddress(const std::string& ip)
|
||||
: m_Address(0), m_Valid(false){
|
||||
: m_Address(0), m_Valid(false) {
|
||||
|
||||
std::sregex_iterator begin(ip.begin(), ip.end(), IPRegex);
|
||||
std::sregex_iterator end;
|
||||
@@ -41,7 +41,7 @@ IPAddress::IPAddress(const std::string& ip)
|
||||
}
|
||||
|
||||
IPAddress::IPAddress(const std::wstring& ip)
|
||||
: m_Address(0), m_Valid(false){
|
||||
: m_Address(0), m_Valid(false) {
|
||||
|
||||
std::wsregex_iterator begin(ip.begin(), ip.end(), IPRegexW);
|
||||
std::wsregex_iterator end;
|
||||
@@ -61,7 +61,7 @@ IPAddress::IPAddress(const std::wstring& ip)
|
||||
|
||||
/* Initialize by octets */
|
||||
IPAddress::IPAddress(uint8_t octet1, uint8_t octet2, uint8_t octet3, uint8_t octet4) noexcept
|
||||
: m_Valid(true){
|
||||
: m_Valid(true) {
|
||||
m_Address = (octet1 << 24) | (octet2 << 16) | (octet3 << 8) | octet4;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user