forked from mirror/OpenTTD
Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully.
This commit is contained in:
@@ -63,7 +63,6 @@ public:
|
||||
*/
|
||||
class TCPConnecter {
|
||||
private:
|
||||
class ThreadObject *thread; ///< Thread used to create the TCP connection
|
||||
bool connected; ///< Whether we succeeded in making the connection
|
||||
bool aborted; ///< Whether we bailed out (i.e. connection making failed)
|
||||
bool killed; ///< Whether we got killed
|
||||
@@ -71,7 +70,7 @@ private:
|
||||
|
||||
void Connect();
|
||||
|
||||
static void ThreadEntry(void *param);
|
||||
static void ThreadEntry(TCPConnecter *param);
|
||||
|
||||
protected:
|
||||
/** Address we're connecting to */
|
||||
|
Reference in New Issue
Block a user