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.
This commit is contained in:
Charles Giessen 2024-06-20 13:30:36 -05:00 committed by Charles Giessen
parent 500c17f5d0
commit 42cef2cd14

View File

@ -185,7 +185,7 @@ struct GenericFeatureChain {
template <typename T> 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<VkStructureType>(features.sType) == node.sType) {
node.combine(features);
return;
}