mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Change assertion to condition on generating the vector size check. (#1518)
This commit is contained in:
parent
2207dc92c6
commit
bceab2b9d2
@ -8098,10 +8098,8 @@ std::string VulkanHppGenerator::generateRAIIHandleVectorSizeCheck( std::string c
|
|||||||
size_t defaultStartIndex = determineDefaultStartIndex( commandData.params, skippedParams );
|
size_t defaultStartIndex = determineDefaultStartIndex( commandData.params, skippedParams );
|
||||||
std::string firstVectorName = startLowerCase( stripPrefix( commandData.params[cvm.second[0]].name, "p" ) );
|
std::string firstVectorName = startLowerCase( stripPrefix( commandData.params[cvm.second[0]].name, "p" ) );
|
||||||
|
|
||||||
if ( cvm.second.size() == 1 )
|
if ( ( cvm.second.size() == 1 ) && ( isLenByStructMember( commandData.params[cvm.second[0]].len, commandData.params[cvm.first] ) ) )
|
||||||
{
|
{
|
||||||
assert( isLenByStructMember( commandData.params[cvm.second[0]].len, commandData.params[cvm.first] ) );
|
|
||||||
|
|
||||||
std::vector<std::string> lenParts = tokenize( commandData.params[cvm.second[0]].len, "->" );
|
std::vector<std::string> lenParts = tokenize( commandData.params[cvm.second[0]].len, "->" );
|
||||||
assert( lenParts.size() == 2 );
|
assert( lenParts.size() == 2 );
|
||||||
std::string sizeValue = startLowerCase( stripPrefix( lenParts[0], "p" ) ) + "." + lenParts[1];
|
std::string sizeValue = startLowerCase( stripPrefix( lenParts[0], "p" ) ) + "." + lenParts[1];
|
||||||
@ -9972,10 +9970,8 @@ std::string VulkanHppGenerator::generateVectorSizeCheck( std::string const &
|
|||||||
size_t defaultStartIndex = determineDefaultStartIndex( commandData.params, skippedParams );
|
size_t defaultStartIndex = determineDefaultStartIndex( commandData.params, skippedParams );
|
||||||
std::string firstVectorName = startLowerCase( stripPrefix( commandData.params[cvm.second[0]].name, "p" ) );
|
std::string firstVectorName = startLowerCase( stripPrefix( commandData.params[cvm.second[0]].name, "p" ) );
|
||||||
|
|
||||||
if ( cvm.second.size() == 1 )
|
if ( ( cvm.second.size() == 1 ) && ( isLenByStructMember( commandData.params[cvm.second[0]].len, commandData.params[cvm.first] ) ) )
|
||||||
{
|
{
|
||||||
assert( isLenByStructMember( commandData.params[cvm.second[0]].len, commandData.params[cvm.first] ) );
|
|
||||||
|
|
||||||
std::vector<std::string> lenParts = tokenize( commandData.params[cvm.second[0]].len, "->" );
|
std::vector<std::string> lenParts = tokenize( commandData.params[cvm.second[0]].len, "->" );
|
||||||
assert( lenParts.size() == 2 );
|
assert( lenParts.size() == 2 );
|
||||||
std::string sizeValue = startLowerCase( stripPrefix( lenParts[0], "p" ) ) + "." + lenParts[1];
|
std::string sizeValue = startLowerCase( stripPrefix( lenParts[0], "p" ) ) + "." + lenParts[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user