Mark every non-enhanced function with VULKAN_HPP_NOEXCEPT. (#481)

This commit is contained in:
Andreas Süßenbach 2020-01-14 10:37:54 +01:00 committed by Markus Tavenrath
parent 65450515ee
commit e49f02013a
2 changed files with 376 additions and 361 deletions

View File

@ -1517,9 +1517,9 @@ void VulkanHppGenerator::appendFunction(std::string & str, std::string const& in
appendFunctionHeaderArguments(str, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, enhanced, singular, !definition, withAllocator); appendFunctionHeaderArguments(str, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, enhanced, singular, !definition, withAllocator);
// Any function that originally does not return VkResult can be marked noexcept, // Any function that originally does not return VkResult can be marked noexcept,
// if it is enhanced it musnt't include anything with an Allocator or needs size checks on multiple vectors // if it is enhanced it must not include anything with an Allocator or needs size checks on multiple vectors
bool hasAllocator = enhancedReturnType.find("Allocator") != std::string::npos; bool hasAllocator = enhancedReturnType.find("Allocator") != std::string::npos;
if (commandData.second.returnType != "VkResult" && !(enhanced && (hasAllocator || needsMultiVectorSizeCheck(returnParamIndex, vectorParamIndices)))) if (!enhanced || (commandData.second.returnType != "VkResult" && !(enhanced && (hasAllocator || needsMultiVectorSizeCheck(returnParamIndex, vectorParamIndices)))))
{ {
str += " VULKAN_HPP_NOEXCEPT"; str += " VULKAN_HPP_NOEXCEPT";
} }

File diff suppressed because it is too large Load Diff