diff --git a/src/shader_recompiler/object_pool.h b/src/shader_recompiler/object_pool.h index c10751b9d1..4242816344 100644 --- a/src/shader_recompiler/object_pool.h +++ b/src/shader_recompiler/object_pool.h @@ -18,7 +18,7 @@ public: } template - requires std::is_constructible_v[[nodiscard]] T* Create(Args&&... args) { + requires std::is_constructible_v [[nodiscard]] T* Create(Args&&... args) { return std::construct_at(Memory(), std::forward(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: