diff options
author | Michael Lutz <michi@icosahedron.de> | 2019-03-17 01:59:46 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-04-06 11:27:39 +0200 |
commit | 05bc2ed7cbe07cb4cd535932f10778b35f72e944 (patch) | |
tree | 0faaf12fd1bafb0786236ffc82052e8b83dfca60 /src/linkgraph/linkgraphschedule.cpp | |
parent | 05f4e7360886e36b221ef5c3af4426625a3de686 (diff) | |
download | openttd-05bc2ed7cbe07cb4cd535932f10778b35f72e944.tar.xz |
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.
Diffstat (limited to 'src/linkgraph/linkgraphschedule.cpp')
-rw-r--r-- | src/linkgraph/linkgraphschedule.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp index 8c508d817..c5f797f18 100644 --- a/src/linkgraph/linkgraphschedule.cpp +++ b/src/linkgraph/linkgraphschedule.cpp @@ -69,13 +69,11 @@ void LinkGraphSchedule::JoinNext() } /** - * Run all handlers for the given Job. This method is tailored to - * ThreadObject::New. - * @param j Pointer to a link graph job. + * Run all handlers for the given Job. + * @param job Pointer to a link graph job. */ -/* static */ void LinkGraphSchedule::Run(void *j) +/* static */ void LinkGraphSchedule::Run(LinkGraphJob *job) { - LinkGraphJob *job = (LinkGraphJob *)j; for (uint i = 0; i < lengthof(instance.handlers); ++i) { instance.handlers[i]->Run(*job); } |