mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44: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 );
|
||||
}
|
||||
}
|
||||
} ___wsinit;
|
||||
};
|
||||
|
||||
static __wsinit InitWinSock()
|
||||
{
|
||||
static __wsinit init;
|
||||
return init;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Socket::Socket()
|
||||
: m_sock( -1 )
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
InitWinSock();
|
||||
#endif
|
||||
}
|
||||
|
||||
Socket::Socket( int sock )
|
||||
@ -182,6 +192,9 @@ bool Socket::HasData()
|
||||
ListenSocket::ListenSocket()
|
||||
: m_sock( -1 )
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
InitWinSock();
|
||||
#endif
|
||||
}
|
||||
|
||||
ListenSocket::~ListenSocket()
|
||||
|
Loading…
Reference in New Issue
Block a user