Skip to content

Commit 33283db

Browse files
committed
Use reference in loop
1 parent 09289b3 commit 33283db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

attachments/15_hello_triangle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class HelloTriangleApplication {
299299

300300
vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
301301
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
302-
for ( auto image : swapChainImages )
302+
for (auto& image : swapChainImages)
303303
{
304304
imageViewCreateInfo.image = image;
305305
swapChainImageViews.emplace_back( device, imageViewCreateInfo );

attachments/18_vertex_input.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class HelloTriangleApplication {
344344

345345
vk::ImageViewCreateInfo imageViewCreateInfo{ .viewType = vk::ImageViewType::e2D, .format = swapChainSurfaceFormat.format,
346346
.subresourceRange = { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } };
347-
for ( auto image : swapChainImages )
347+
for (auto& image : swapChainImages)
348348
{
349349
imageViewCreateInfo.image = image;
350350
swapChainImageViews.emplace_back( device, imageViewCreateInfo );

0 commit comments

Comments
 (0)