From 42cef2cd1420789227c44acce2c8e69968191fe6 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Thu, 20 Jun 2024 13:30:36 -0500 Subject: [PATCH] static_cast the sType to allow Vulkan-Hpp types to work The add_required_extensions_features function is templated, allowing both vulkan.h and vulkan-hpp types to be passed in. Due to recent changes in the generic features struct code, this stopped working. By casting the sType explicitely using static_cast, it restores usage of vulkan-hpp types. --- src/VkBootstrap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index 2c6f298..5f7c0a6 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -185,7 +185,7 @@ struct GenericFeatureChain { template void add(T const& features) noexcept { // If this struct is already in the list, combine it for (auto& node : nodes) { - if (features.sType == node.sType) { + if (static_cast(features.sType) == node.sType) { node.combine(features); return; }