mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Static initialization order is implementation specific.
This commit is contained in:
parent
9d2fef2f11
commit
4ce7f77cd9
@ -30,12 +30,22 @@ struct __wsinit
|
|||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ___wsinit;
|
};
|
||||||
|
|
||||||
|
static __wsinit InitWinSock()
|
||||||
|
{
|
||||||
|
static __wsinit init;
|
||||||
|
return init;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Socket::Socket()
|
Socket::Socket()
|
||||||
: m_sock( -1 )
|
: m_sock( -1 )
|
||||||
{
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
InitWinSock();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Socket::Socket( int sock )
|
Socket::Socket( int sock )
|
||||||
@ -182,6 +192,9 @@ bool Socket::HasData()
|
|||||||
ListenSocket::ListenSocket()
|
ListenSocket::ListenSocket()
|
||||||
: m_sock( -1 )
|
: m_sock( -1 )
|
||||||
{
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
InitWinSock();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ListenSocket::~ListenSocket()
|
ListenSocket::~ListenSocket()
|
||||||
|
Loading…
Reference in New Issue
Block a user