Change all functions with ArrayProxy[NoTemporaries] as arguments to take by const & instead of by value.

This commit is contained in:
asuessenbach 2020-07-02 12:03:13 +02:00
parent 4c576dee25
commit 8ae008dba8
2 changed files with 809 additions and 778 deletions

View File

@ -2798,7 +2798,7 @@ void VulkanHppGenerator::appendFunctionHeaderArgumentEnhancedVector( std::string
// otherwise, use our ArrayProxy
bool isConst = ( param.type.prefix.find( "const" ) != std::string::npos );
str += optionalBegin + "ArrayProxy<" +
( isTemplateParam ? ( isConst ? "const T" : "T" ) : stripPostfix( param.type.compose(), "*" ) ) + "> " +
( isTemplateParam ? ( isConst ? "const T" : "T" ) : stripPostfix( param.type.compose(), "*" ) ) + "> const &" +
optionalEnd + strippedParameterName;
}
}
@ -3834,7 +3834,7 @@ void VulkanHppGenerator::appendStructSetter( std::string & str
}
static const std::string setArrayTemplate = R"(
${templateHeader}${structureName} & set${ArrayName}( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<${memberType}> ${arrayName} ) VULKAN_HPP_NOEXCEPT
${templateHeader}${structureName} & set${ArrayName}( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<${memberType}> const & ${arrayName} ) VULKAN_HPP_NOEXCEPT
{
${lenName} = ${lenValue};
${memberName} = ${arrayName}.data();

File diff suppressed because it is too large Load Diff