Skip to content

Commit 212a029

Browse files
committed
Update documentation code snippet to actually match code
Fixes #413
1 parent b7be589 commit 212a029

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

en/03_Drawing_a_triangle/00_Setup/02_Validation_layers.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,16 @@ void createInstance()
175175
176176
// Check if the required extensions are supported by the Vulkan implementation.
177177
auto extensionProperties = context.enumerateInstanceExtensionProperties();
178-
auto unsupportedLayerIt = std::ranges::find_if(requiredLayers,
179-
[&layerProperties](auto const &requiredLayer) {
180-
return std::ranges::none_of(layerProperties,
181-
[requiredLayer](auto const &layerProperty) { return strcmp(layerProperty.layerName, requiredLayer) == 0; });
182-
});
178+
auto unsupportedPropertyIt =
179+
std::ranges::find_if(requiredExtensions,
180+
[&extensionProperties](auto const &requiredExtension) {
181+
return std::ranges::none_of(extensionProperties,
182+
[requiredExtension](auto const &extensionProperty) { return strcmp(extensionProperty.extensionName, requiredExtension) == 0; });
183+
});
183184
if (unsupportedPropertyIt != requiredExtensions.end())
184185
{
185186
throw std::runtime_error("Required extension not supported: " + std::string(*unsupportedPropertyIt));
186-
}
187+
}
187188
188189
...
189190
}

0 commit comments

Comments
 (0)