Skip to content

Commit 318dffc

Browse files
committed
Apply recent changes from the tutorial
1 parent c6df655 commit 318dffc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ We'll move the cleanup code of all objects that are recreated as part of a swap
5757
[,c++]
5858
----
5959
void cleanupSwapChain() {
60-
for (size_t i = 0; i < swapChainFramebuffers.size(); i++) {
61-
vkDestroyFramebuffer(device, swapChainFramebuffers[i], nullptr);
60+
for (auto framebuffer : swapChainFramebuffers) {
61+
vvkDestroyFramebuffer(device, framebuffer, nullptr);
6262
}
6363
64-
for (size_t i = 0; i < swapChainImageViews.size(); i++) {
65-
vkDestroyImageView(device, swapChainImageViews[i], nullptr);
64+
for (auto imageView : swapChainImageViews) {
65+
vkDestroyImageView(device, imageView, nullptr);
6666
}
6767
6868
vkDestroySwapchainKHR(device, swapChain, nullptr);

0 commit comments

Comments
 (0)