fix: compiler warnings

This commit is contained in:
2021-09-02 10:48:14 +02:00
parent fe86bffc2e
commit 04d1e3c0bf
22 changed files with 74 additions and 79 deletions

View File

@@ -16,15 +16,14 @@ namespace network {
/* Create an invalid address */
IPAddress::IPAddress() noexcept
: m_Valid(false), m_Address(0)
{
}
: m_Address(0), m_Valid(false){
}
/* Initialize by string IP */
IPAddress::IPAddress(const std::string& ip)
: m_Valid(false), m_Address(0)
{
: m_Address(0), m_Valid(false){
std::sregex_iterator begin(ip.begin(), ip.end(), IPRegex);
std::sregex_iterator end;
@@ -42,8 +41,8 @@ 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;
@@ -62,8 +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;
}