// create compute pipeline.
VkPipelineLayout compute_pipeline_layout;
VkPipeline compute_pipeline;
- utility::Cleanup cleanup_pipeline_layout(utility::Cleanup::Nop{});
- utility::Cleanup cleanup_pipeline(utility::Cleanup::Nop{});
+ utility::Cleanup cleanup_pipeline_layout{};
+ utility::Cleanup cleanup_pipeline{};
{
VkShaderModuleCreateInfo shader_module_create_info{};
shader_module_create_info.sType =
VkBuffer precomputed_buf;
VkDeviceMemory precomputed_buf_mem;
- utility::Cleanup cleanup_precomputed_buf(utility::Cleanup::Nop{});
- utility::Cleanup cleanup_precomputed_buf_mem(utility::Cleanup::Nop{});
+ utility::Cleanup cleanup_precomputed_buf{};
+ utility::Cleanup cleanup_precomputed_buf_mem{};
{
VkBuffer staging_buffer;
VkDeviceMemory staging_buffer_mem;
VkBuffer other_buf;
VkDeviceMemory other_buf_mem;
- utility::Cleanup cleanup_other_buf(utility::Cleanup::Nop{});
- utility::Cleanup cleanup_other_buf_mem(utility::Cleanup::Nop{});
+ utility::Cleanup cleanup_other_buf{};
+ utility::Cleanup cleanup_other_buf_mem{};
{
VkBuffer staging_buffer;
VkDeviceMemory staging_buffer_mem;
utility::Cleanup::Cleanup(std::function<void(void *)> fn, void *ptr)
: fn(fn), ptr(ptr) {}
-utility::Cleanup::Cleanup(Nop) : fn(), ptr(nullptr) {}
+utility::Cleanup::Cleanup() : fn(), ptr(nullptr) {}
utility::Cleanup::~Cleanup() {
if (this->fn.has_value()) {