mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-14 00:21:24 +00:00
Fix threadIndex mistakenly getting captured by reference
This commit is contained in:
parent
6729561354
commit
c5d09682a0
1 changed files with 1 additions and 1 deletions
|
@ -505,7 +505,7 @@ void CPURaytracer::RunJob(int count, std::function<void(int)> callback)
|
|||
std::vector<std::thread> threads;
|
||||
for (int threadIndex = 0; threadIndex < numThreads; threadIndex++)
|
||||
{
|
||||
threads.push_back(std::thread([&]() {
|
||||
threads.push_back(std::thread([&, threadIndex]() {
|
||||
|
||||
for (int i = threadIndex; i < count; i += numThreads)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue