Cleanup on helper classes ObjectDestroy and ObjectFree

This commit is contained in:
asuessenbach
2020-08-17 14:26:25 +02:00
parent 987fbd8ee1
commit b9a1af5aa1
2 changed files with 41 additions and 44 deletions

View File

@@ -4849,12 +4849,12 @@ namespace VULKAN_HPP_NAMESPACE
class ObjectDestroy
{
public:
ObjectDestroy() : m_owner(), m_allocationCallbacks( nullptr ), m_dispatch( nullptr ) {}
ObjectDestroy() = default;
ObjectDestroy( OwnerType owner,
Optional<const AllocationCallbacks> allocationCallbacks
VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
@@ -4878,9 +4878,9 @@ namespace VULKAN_HPP_NAMESPACE
}
private:
OwnerType m_owner;
Optional<const AllocationCallbacks> m_allocationCallbacks;
Dispatch const * m_dispatch;
OwnerType m_owner = {};
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
Dispatch const * m_dispatch = nullptr;
};
class NoParent;
@@ -4889,10 +4889,10 @@ namespace VULKAN_HPP_NAMESPACE
class ObjectDestroy<NoParent, Dispatch>
{
public:
ObjectDestroy() : m_allocationCallbacks( nullptr ), m_dispatch( nullptr ) {}
ObjectDestroy() = default;
ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks,
Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
: m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
{}
@@ -4911,19 +4911,19 @@ namespace VULKAN_HPP_NAMESPACE
}
private:
Optional<const AllocationCallbacks> m_allocationCallbacks;
Dispatch const * m_dispatch;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
Dispatch const * m_dispatch = nullptr;
};
template <typename OwnerType, typename Dispatch>
class ObjectFree
{
public:
ObjectFree() : m_owner(), m_allocationCallbacks( nullptr ), m_dispatch( nullptr ) {}
ObjectFree() = default;
ObjectFree( OwnerType owner,
Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
@@ -4948,9 +4948,9 @@ namespace VULKAN_HPP_NAMESPACE
}
private:
OwnerType m_owner;
Optional<const AllocationCallbacks> m_allocationCallbacks;
Dispatch const * m_dispatch;
OwnerType m_owner = {};
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
Dispatch const * m_dispatch = nullptr;
};
template <typename OwnerType, typename PoolType, typename Dispatch>