From 38e3e8f800c81f18419c00c6003d582a66e59c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Mon, 19 Feb 2024 12:35:54 +0100 Subject: [PATCH] Fix ordering determination of structs. (#1807) --- VulkanHppGenerator.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 6a30c4b..6da69d9 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -1701,9 +1701,20 @@ bool VulkanHppGenerator::containsFloatingPoints( std::vector const & { for ( auto const & m : members ) { - if ( ( ( m.type.type == "float" ) || ( m.type.type == "double" ) ) && m.type.isValue() ) + if (m.type.isValue()) { - return true; + if ( ( m.type.type == "float" ) || ( m.type.type == "double" ) ) + { + return true; + } + else + { + auto structureIt = m_structs.find( m.type.type ); + if (structureIt != m_structs.end() && containsFloatingPoints(structureIt->second.members)) + { + return true; + } + } } } return false;