Correct data type in singular version of one generated function flavor.

This commit is contained in:
asuessenbach 2021-04-20 09:02:59 +02:00
parent 49e5f24a9d
commit 6a72c6f43a

View File

@ -6049,9 +6049,9 @@ std::string
constructArgumentListEnhanced( commandData.params, skippedParams, singularParams, definition, false, false, true ); constructArgumentListEnhanced( commandData.params, skippedParams, singularParams, definition, false, false, true );
std::string commandName = std::string commandName =
stripPluralS( determineCommandName( name, commandData.params[initialSkipCount - 1].type.type, m_tags ) ); stripPluralS( determineCommandName( name, commandData.params[initialSkipCount - 1].type.type, m_tags ) );
std::string nodiscard = determineNoDiscard( 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() ); std::string nodiscard = determineNoDiscard( 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
std::string returnType = std::string dataType = stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" );
constructReturnType( commandData, stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" ) ); std::string returnType = constructReturnType( commandData, dataType );
if ( definition ) if ( definition )
{ {
@ -6059,7 +6059,7 @@ std::string
R"( template <typename Dispatch> R"( template <typename Dispatch>
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} ) const ${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} ) const
{ {
${returnType} ${dataName}; ${dataType} ${dataName};
Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) ); Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) );
return createResultValue( result, ${dataName}, VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList} ); return createResultValue( result, ${dataName}, VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList} );
})"; })";
@ -6075,6 +6075,7 @@ std::string
{ "classSeparator", commandData.handle.empty() ? "" : "::" }, { "classSeparator", commandData.handle.empty() ? "" : "::" },
{ "commandName", commandName }, { "commandName", commandName },
{ "dataName", stripPluralS( startLowerCase( stripPrefix( commandData.params[returnParamIndex].name, "p" ) ) ) }, { "dataName", stripPluralS( startLowerCase( stripPrefix( commandData.params[returnParamIndex].name, "p" ) ) ) },
{ "dataType", dataType },
{ "nodiscard", nodiscard }, { "nodiscard", nodiscard },
{ "returnType", returnType }, { "returnType", returnType },
{ "successCodeList", constructSuccessCodeList( commandData.successCodes ) }, { "successCodeList", constructSuccessCodeList( commandData.successCodes ) },