mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-08 13:40:08 +00:00
Introduce operator bool() and operator!() on vk::raii handle wrapper classes
Only if VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS is defined, as otherwise those checks are not meaningful.
This commit is contained in:
parent
6d5d6661f3
commit
71e67fa32d
@ -2988,7 +2988,6 @@ ${moveAssignmentInstructions}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
${memberFunctionsDeclarations}
|
||||
|
||||
VULKAN_HPP_NAMESPACE::${handleType} const & operator*() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
@ -3001,6 +3000,19 @@ ${getConstructorSuccessCode}
|
||||
return ${getDispatcherReturn}m_dispatcher;
|
||||
}
|
||||
|
||||
#if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
|
||||
explicit operator bool() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return m_${handleName}.operator bool();
|
||||
}
|
||||
|
||||
bool operator!() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return m_${handleName}.operator!();
|
||||
}
|
||||
#endif
|
||||
${memberFunctionsDeclarations}
|
||||
|
||||
private:
|
||||
${memberVariables}
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user