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:
Charles Giessen 2020-12-17 01:43:39 -07:00
parent af5409fcea
commit c02642843c

View File

@ -1660,7 +1660,7 @@ detail::Result<std::vector<VkImageView>> Swapchain::get_image_views () {
if (!swapchain_images_ret) return swapchain_images_ret.error ();
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++) {
VkImageViewCreateInfo createInfo = {};