diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-09-24 22:44:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 22:44:25 +0200 |
commit | 9a53173e4de2194a128a33764d3f50f02f358efa (patch) | |
tree | 6f6cf76701e48f6c83e105ab06b2e6f82627dbf9 /src/shader_recompiler | |
parent | Merge pull request #7069 from lioncash/uuid (diff) | |
parent | CMakeLists: Update to clang format version 12 (diff) | |
download | yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.gz yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.bz2 yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.lz yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.xz yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.zst yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.zip |
Diffstat (limited to 'src/shader_recompiler')
-rw-r--r-- | src/shader_recompiler/object_pool.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shader_recompiler/object_pool.h b/src/shader_recompiler/object_pool.h index f3b12d04b..a12ddcc8f 100644 --- a/src/shader_recompiler/object_pool.h +++ b/src/shader_recompiler/object_pool.h @@ -11,14 +11,16 @@ namespace Shader { template <typename T> -requires std::is_destructible_v<T> class ObjectPool { +requires std::is_destructible_v<T> +class ObjectPool { public: explicit ObjectPool(size_t chunk_size = 8192) : new_chunk_size{chunk_size} { node = &chunks.emplace_back(new_chunk_size); } 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)...); } |