general: Update style to clang-format-12

This commit is contained in:
ameerj 2021-09-24 01:21:07 -04:00
parent 31c0f6ca33
commit 73666fb262
13 changed files with 62 additions and 66 deletions

View file

@ -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)...);
}