Merge pull request #1447 from asuessenbach/function

Extent support of functions returning some typed value
This commit is contained in:
Andreas Süßenbach 2022-11-14 11:45:35 +01:00 committed by GitHub
commit 8e157602f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 17 deletions

View File

@ -4013,13 +4013,11 @@ std::string
if ( returnParams.empty() )
{
std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandData.params );
if ( vectorParams.empty() )
{
if ( determineConstPointerParams( commandData.params ).empty() )
if ( vectorParams.empty() && determineConstPointerParams( commandData.params ).empty() )
{
return generateCommandSetStandard( generateCommandStandard( name, commandData, initialSkipCount, definition ) );
}
else
else if ( vectorParams.size() <= 1 )
{
return generateCommandSetStandardEnhanced(
definition,
@ -4027,7 +4025,6 @@ std::string
generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false, false, false ) );
}
}
}
return "";
}
@ -7110,7 +7107,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandValue( std::map<std::st
if ( returnParams.empty() )
{
std::map<size_t, VectorParamData> vectorParams = determineVectorParams( commandIt->second.params );
if ( vectorParams.empty() )
if ( vectorParams.size() <= 1 )
{
return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition, false, false );
}

View File

@ -91,8 +91,7 @@
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
// Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
// convertible to size_t.
// Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t.
template <typename V,
typename std::enable_if<
std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&

View File

@ -795,8 +795,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
// Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
// convertible to size_t.
// Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t.
template <typename V,
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>