mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +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;
|
return *this;
|
||||||
}
|
}
|
||||||
${memberFunctionsDeclarations}
|
|
||||||
|
|
||||||
VULKAN_HPP_NAMESPACE::${handleType} const & operator*() const VULKAN_HPP_NOEXCEPT
|
VULKAN_HPP_NAMESPACE::${handleType} const & operator*() const VULKAN_HPP_NOEXCEPT
|
||||||
{
|
{
|
||||||
@ -3001,6 +3000,19 @@ ${getConstructorSuccessCode}
|
|||||||
return ${getDispatcherReturn}m_dispatcher;
|
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:
|
private:
|
||||||
${memberVariables}
|
${memberVariables}
|
||||||
};
|
};
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user