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:
@@ -13,6 +13,7 @@
|
||||
#define GENWORLD_H
|
||||
|
||||
#include "company_type.h"
|
||||
#include <thread>
|
||||
|
||||
/** Constants related to world generation */
|
||||
enum LandscapeGenerator {
|
||||
@@ -61,7 +62,7 @@ struct GenWorldInfo {
|
||||
uint size_y; ///< Y-size of the map
|
||||
GWDoneProc *proc; ///< Proc that is called when done (can be NULL)
|
||||
GWAbortProc *abortp; ///< Proc that is called when aborting (can be NULL)
|
||||
class ThreadObject *thread; ///< The thread we are in (can be NULL)
|
||||
std::thread thread; ///< The thread we are in (joinable if a thread was created)
|
||||
};
|
||||
|
||||
/** Current stage of world generation process */
|
||||
|
Reference in New Issue
Block a user