Merge pull request #906 from asuessenbach/relax

Relax an assertion.
This commit is contained in:
Andreas Süßenbach 2021-03-10 15:43:08 +01:00 committed by GitHub
commit dbe01543d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3879,13 +3879,14 @@ std::string VulkanHppGenerator::constructCallArgumentEnhanced( ParamData const &
std::string name = startLowerCase( stripPrefix( param.name, "p" ) ); std::string name = startLowerCase( stripPrefix( param.name, "p" ) );
if ( param.len.empty() ) if ( param.len.empty() )
{ {
assert( param.arraySizes.empty() && !param.optional ); assert( param.arraySizes.empty() );
if ( beginsWith( param.type.type, "Vk" ) ) if ( beginsWith( param.type.type, "Vk" ) )
{ {
argument = "reinterpret_cast<" + param.type.type + " *>( &" + name + " )"; argument = "reinterpret_cast<" + param.type.type + " *>( &" + name + " )";
} }
else else
{ {
assert( !param.optional );
argument = "&" + name; argument = "&" + name;
} }
} }