summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-24 02:07:14 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:24 +0200
commit1d2db783986717c912709ccea4a18d9b8f396ee1 (patch)
treed6d3e15fd7b40e4465bd521e91b60ab640d2812d
parentshader: Implement VOTE (diff)
downloadyuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.tar
yuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.tar.gz
yuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.tar.bz2
yuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.tar.lz
yuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.tar.xz
yuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.tar.zst
yuzu-1d2db783986717c912709ccea4a18d9b8f396ee1.zip
-rw-r--r--src/shader_recompiler/object_pool.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/object_pool.h b/src/shader_recompiler/object_pool.h
index c10751b9d..424281634 100644
--- a/src/shader_recompiler/object_pool.h
+++ b/src/shader_recompiler/object_pool.h
@@ -18,7 +18,7 @@ public:
}
template <typename... Args>
- requires std::is_constructible_v<T, Args...>[[nodiscard]] T* Create(Args&&... args) {
+ requires std::is_constructible_v<T, Args...> [[nodiscard]] T* Create(Args&&... args) {
return std::construct_at(Memory(), std::forward<Args>(args)...);
}
@@ -32,12 +32,12 @@ public:
const size_t total_objects{root.num_objects + new_chunk_size * (chunks.size() - 1)};
chunks.clear();
chunks.emplace_back(total_objects);
- chunks.shrink_to_fit();
} else {
root.Release();
chunks.resize(1);
- chunks.shrink_to_fit();
}
+ chunks.shrink_to_fit();
+ node = &chunks.front();
}
private: