Fixed use-after-move in TaskLoop::addTaskImpl() and some minor compilation problems.
This commit is contained in:
parent
e6556c6f90
commit
d0be5f7739
@ -779,7 +779,7 @@ void TaskHandle::cancel() const MIJIN_NOEXCEPT
|
||||
}
|
||||
}
|
||||
|
||||
Optional<std::source_location> TaskHandle::getLocation() const noexcept
|
||||
Optional<std::source_location> TaskHandle::getLocation() const MIJIN_NOEXCEPT
|
||||
{
|
||||
if (std::shared_ptr<TaskSharedState> state = state_.lock())
|
||||
{
|
||||
@ -825,7 +825,7 @@ FuturePtr<TResult> TaskLoop<TAllocator>::addTaskImpl(TaskBase<TResult, TAllocato
|
||||
|
||||
// add tasks to a seperate vector first as we might be running another task right now
|
||||
TAllocator<WrappedTask<TaskBase<TResult, TAllocator>>> allocator(allocator_);
|
||||
addStoredTask(StoredTask(wrapTask(std::move(allocator), std::move(task)), std::move(setFuture), std::move(future)));
|
||||
addStoredTask(StoredTask(wrapTask(std::move(allocator), std::move(task)), std::move(setFuture), future));
|
||||
|
||||
return future;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <charconv>
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
|
Loading…
x
Reference in New Issue
Block a user