fix: compiler warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace td {
|
||||
namespace network {
|
||||
|
||||
Socket::Socket(Type type)
|
||||
: m_Handle(INVALID_SOCKET),
|
||||
: m_Blocking(false),
|
||||
m_Type(type),
|
||||
m_Blocking(false),
|
||||
m_Status(Disconnected)
|
||||
m_Status(Disconnected),
|
||||
m_Handle(INVALID_SOCKET)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -33,6 +33,8 @@ bool Socket::SetBlocking(bool block) {
|
||||
}
|
||||
|
||||
m_Blocking = block;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Socket::IsBlocking() const noexcept {
|
||||
|
||||
Reference in New Issue
Block a user