Renderer: Replace unique_ptr by shared_ptr

This commit is contained in:
Jérôme Leclercq
2020-09-20 15:56:58 +02:00
parent 77b46e4811
commit f15709c8a3
13 changed files with 55 additions and 55 deletions

View File

@@ -219,7 +219,7 @@ namespace Nz
return true;
}
std::unique_ptr<CommandPool> VkRenderWindow::CreateCommandPool(QueueType queueType)
std::shared_ptr<CommandPool> VkRenderWindow::CreateCommandPool(QueueType queueType)
{
UInt32 queueFamilyIndex = [&] {
switch (queueType)
@@ -237,7 +237,7 @@ namespace Nz
throw std::runtime_error("invalid queue type " + std::to_string(UnderlyingCast(queueType)));
}();
return std::make_unique<VulkanCommandPool>(*m_device, queueFamilyIndex);
return std::make_shared<VulkanCommandPool>(*m_device, queueFamilyIndex);
}
void VkRenderWindow::Present(UInt32 imageIndex, VkSemaphore waitSemaphore)