mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:35:08 +02:00
address code review comments
This commit is contained in:
parent
e1d79ee8f4
commit
a8ac015bc4
2 changed files with 4 additions and 2 deletions
|
@ -280,10 +280,10 @@ void AssetServer::aboutToFinish() {
|
|||
// abort each of our still running bake tasks, remove pending bakes that were never put on the thread pool
|
||||
auto it = _pendingBakes.begin();
|
||||
while (it != _pendingBakes.end()) {
|
||||
auto pendingRunnable = _bakingTaskPool.tryTake(it.value().get());
|
||||
auto pendingRunnable = _bakingTaskPool.tryTake(it->get());
|
||||
|
||||
if (pendingRunnable) {
|
||||
_pendingBakes.erase(it);
|
||||
it = _pendingBakes.erase(it);
|
||||
} else {
|
||||
it.value()->abort();
|
||||
++it;
|
||||
|
|
|
@ -460,6 +460,8 @@ void generateMips(gpu::Texture* texture, QImage& image, const std::atomic<bool>&
|
|||
for (int i = 0; i < count; i++) {
|
||||
if (!_abortProcessing.load()) {
|
||||
task(context, i);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue