mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-26 08:44:36 +00:00
Fix crash due to vector initialization using wrong constructor
Because VkImageView is a uint64_t, not a strong type, the constructor thinks the .size() is a value to initialize with, not a size.
This commit is contained in:
parent
af5409fcea
commit
c02642843c
@ -1660,7 +1660,7 @@ detail::Result<std::vector<VkImageView>> Swapchain::get_image_views () {
|
|||||||
if (!swapchain_images_ret) return swapchain_images_ret.error ();
|
if (!swapchain_images_ret) return swapchain_images_ret.error ();
|
||||||
auto swapchain_images = swapchain_images_ret.value ();
|
auto swapchain_images = swapchain_images_ret.value ();
|
||||||
|
|
||||||
std::vector<VkImageView> views{ swapchain_images.size () };
|
std::vector<VkImageView> views (swapchain_images.size ());
|
||||||
|
|
||||||
for (size_t i = 0; i < swapchain_images.size (); i++) {
|
for (size_t i = 0; i < swapchain_images.size (); i++) {
|
||||||
VkImageViewCreateInfo createInfo = {};
|
VkImageViewCreateInfo createInfo = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user