Merge pull request #508 from jackoalan/dynamic-loader-move

Add move semantics to DynamicLoader
This commit is contained in:
Andreas Süßenbach 2020-02-18 08:52:56 +01:00 committed by GitHub
commit 2daf787a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View File

@ -1131,6 +1131,25 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic(std::string & str)
#endif
}
DynamicLoader( DynamicLoader const& ) = delete;
DynamicLoader( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT
: m_success(other.m_success)
, m_library(other.m_library)
{
other.m_library = nullptr;
}
DynamicLoader &operator=( DynamicLoader const& ) = delete;
DynamicLoader &operator=( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT
{
m_success = other.m_success;
m_library = other.m_library;
other.m_library = nullptr;
return *this;
}
~DynamicLoader() VULKAN_HPP_NOEXCEPT
{
if ( m_library )

View File

@ -72471,6 +72471,25 @@ namespace VULKAN_HPP_NAMESPACE
#endif
}
DynamicLoader( DynamicLoader const& ) = delete;
DynamicLoader( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT
: m_success(other.m_success)
, m_library(other.m_library)
{
other.m_library = nullptr;
}
DynamicLoader &operator=( DynamicLoader const& ) = delete;
DynamicLoader &operator=( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT
{
m_success = other.m_success;
m_library = other.m_library;
other.m_library = nullptr;
return *this;
}
~DynamicLoader() VULKAN_HPP_NOEXCEPT
{
if ( m_library )